Check for null pawn cum when merging cum

This commit is contained in:
lutepickle 2023-07-27 14:44:14 -07:00
parent 2350cf7355
commit eb0d40ea1a

View file

@ -902,7 +902,7 @@ namespace RJW_Menstruation
bool merged = false;
if (!cums.NullOrEmpty()) foreach (Cum cum in cums)
{
if (cum.pawn.Equals(cummer))
if (cum.pawn?.Equals(cummer) ?? false)
{
cum.MergeWithCum(volume, fertility);
merged = true;
@ -917,7 +917,7 @@ namespace RJW_Menstruation
bool merged = false;
if (!cums.NullOrEmpty()) foreach (Cum cum in cums)
{
if (cum.pawn.Equals(cummer))
if (cum.pawn?.Equals(cummer) ?? false)
{
cum.MergeWithCum(volume, fertility);
merged = true;
@ -954,7 +954,7 @@ namespace RJW_Menstruation
bool merged = false;
if (!cums.NullOrEmpty()) foreach (Cum cum in cums)
{
if (cum.notcum && cum.pawn.Equals(cummer) && cum.notcumLabel.Equals(notcumlabel))
if (cum.notcum && (cum.pawn?.Equals(cummer) ?? false) && cum.notcumLabel.Equals(notcumlabel))
{
cum.MergeWithFluid(volume, decayresist, filthdef);
merged = true;
@ -969,7 +969,7 @@ namespace RJW_Menstruation
bool merged = false;
if (!cums.NullOrEmpty()) foreach (Cum cum in cums)
{
if (cum.notcum && cum.pawn.Equals(cummer) && cum.notcumLabel.Equals(notcumlabel))
if (cum.notcum && (cum.pawn?.Equals(cummer) ?? false) && cum.notcumLabel.Equals(notcumlabel))
{
cum.MergeWithFluid(volume, decayresist, filthdef);
merged = true;