Handle a null pawn's cum in fertilization

This commit is contained in:
lutepickle 2022-06-04 21:42:59 -07:00
parent 156dfc5f3e
commit f1fcbf13c1
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View file

@ -1113,10 +1113,10 @@ namespace RJW_Menstruation
protected Pawn Fertilize()
{
if (cums.NullOrEmpty()) return null;
float totalFertPower = 0;
List<Cum> eligibleCum = cums.FindAll(cum => cum.FertVolume > 0 && (RJWPregnancySettings.bestial_pregnancy_enabled || xxx.is_animal(parent.pawn) == xxx.is_animal(cum.pawn)));
List<Cum> eligibleCum = cums.FindAll(cum => cum.FertVolume > 0 && cum.pawn != null && (RJWPregnancySettings.bestial_pregnancy_enabled || xxx.is_animal(parent.pawn) == xxx.is_animal(cum.pawn)));
if (eligibleCum.Count == 0) return null;
float totalFertPower = 0;
foreach (Cum cum in eligibleCum)
totalFertPower += cum.FertVolume;