Null check in the xenotype decider

This commit is contained in:
lutepickle 2022-11-20 12:42:40 -08:00
parent 5a17c0e72f
commit 8d0d980048
1 changed files with 2 additions and 2 deletions

View File

@ -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)