minor bugfix: wakeup before partnerinmybed to prevent null ref

This commit is contained in:
Platinum 2020-04-12 22:57:39 -07:00
parent 117a6ae90c
commit 2fb5f220dd
2 changed files with 1 additions and 2 deletions

View file

@ -17,9 +17,8 @@ namespace Rimworld_Animations {
public static void Postfix(ref Pawn pawn, ref Job __result) { public static void Postfix(ref Pawn pawn, ref Job __result) {
if(__result != null) { if(__result != null) {
RestUtility.WakeUp(pawn);
Pawn partnerInMyBed = LovePartnerRelationUtility.GetPartnerInMyBed(pawn); Pawn partnerInMyBed = LovePartnerRelationUtility.GetPartnerInMyBed(pawn);
RestUtility.WakeUp(pawn);
__result = JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("JoinInBedAnimation", true), partnerInMyBed, partnerInMyBed.CurrentBed()); __result = JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("JoinInBedAnimation", true), partnerInMyBed, partnerInMyBed.CurrentBed());
} }