Have GetMenstruationComp(pregnancy) null test
This commit is contained in:
parent
70346a0901
commit
931b974bf9
|
@ -57,7 +57,8 @@ namespace RJW_Menstruation
|
|||
|
||||
public static HediffComp_Menstruation GetMenstruationComp(this Hediff_BasePregnancy pregnancy)
|
||||
{
|
||||
return pregnancy.pawn.GetMenstruationComps().FirstOrDefault(comp => comp.Pregnancy == pregnancy);
|
||||
if (pregnancy == null) return null;
|
||||
else return pregnancy.pawn.GetMenstruationComps().FirstOrDefault(comp => comp.Pregnancy == pregnancy);
|
||||
}
|
||||
|
||||
public static HediffComp_Anus GetAnusComp(this Pawn pawn)
|
||||
|
|
Loading…
Reference in New Issue