Null reference check for pregnancy gizmos. It would come up in multiwomb scenarios

This commit is contained in:
lutepickle 2022-07-30 07:47:38 -07:00
parent e18e1892ad
commit 3f739a12d9
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@ -48,7 +48,7 @@ namespace RJW_Menstruation
if (pawn.IsPregnant())
{
Hediff_BasePregnancy hediff = comp.Pregnancy;
if (Utility.ShowFetusImage(hediff))
if (hediff != null && Utility.ShowFetusImage(hediff))
{
icon = comp.GetPregnancyIcon(hediff);
if (hediff is Hediff_BasePregnancy h)