diff --git a/1.3/Assemblies/RJW_Menstruation.dll b/1.3/Assemblies/RJW_Menstruation.dll index d799128..e7063a4 100644 Binary files a/1.3/Assemblies/RJW_Menstruation.dll and b/1.3/Assemblies/RJW_Menstruation.dll differ diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs index e8939de..c3a5ee5 100644 --- a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs +++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs @@ -184,6 +184,11 @@ namespace RJW_Menstruation public override void CompPostPostRemoved() { + if (parent.pawn.GetBreastComp() == this) + { + Log.Warning($"Attempted to remove breast comp from wrong pawn ({parent.pawn})."); + return; + } HugsLibController.Instance.TickDelayScheduler.TryUnscheduleCallback(action); Log.Message(parent.pawn.Label + " breast tick scheduler removed"); base.CompPostPostRemoved(); diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs index 182e711..054ec07 100644 --- a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs +++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs @@ -527,6 +527,11 @@ namespace RJW_Menstruation public override void CompPostPostRemoved() { + if (parent.pawn.GetMenstruationComps().Contains(this)) + { + Log.Warning($"Attempted to remove menstruation comp from wrong pawn ({parent.pawn})."); + return; + } HugsLibController.Instance.TickDelayScheduler.TryUnscheduleCallback(actionref); Log.Message(parent.pawn.Label + " tick scheduler removed"); pregnancy?.Miscarry();