Null check in the xenotype decider
This commit is contained in:
parent
5a17c0e72f
commit
8d0d980048
|
@ -634,8 +634,8 @@ namespace RJW_Menstruation
|
|||
}
|
||||
XenotypeDef motherInheritableXenotype = mother?.genes?.Xenotype;
|
||||
XenotypeDef fatherInheritableXenotype = father?.genes?.Xenotype;
|
||||
if (!motherInheritableXenotype.inheritable) motherInheritableXenotype = null;
|
||||
if (!fatherInheritableXenotype.inheritable) fatherInheritableXenotype = null;
|
||||
if (!(motherInheritableXenotype?.inheritable ?? false)) motherInheritableXenotype = null;
|
||||
if (!(fatherInheritableXenotype?.inheritable ?? false)) fatherInheritableXenotype = null;
|
||||
|
||||
// If they're the same (or both null)
|
||||
if (motherInheritableXenotype == fatherInheritableXenotype)
|
||||
|
|
Loading…
Reference in New Issue