diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs index 119613e..ae68491 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs @@ -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)