From d84b44cbd10c2cd43801730b1d6999b85f221d8f Mon Sep 17 00:00:00 2001 From: drfrag Date: Fri, 24 Sep 2021 00:54:07 +0200 Subject: [PATCH] - Add missing null pointer check. --- src/playsim/p_mobj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 5c7dbee4d..3c59764be 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -584,7 +584,7 @@ bool AActor::SetState (FState *newstate, bool nofunction) newstate = newstate->GetNextState(); } while (tics == 0); - if (GetInfo()->LightAssociations.Size() || newstate->Light > 0) + if (GetInfo()->LightAssociations.Size() || (newstate && newstate->Light > 0)) { flags8 |= MF8_RECREATELIGHTS; Level->flags3 |= LEVEL3_LIGHTCREATED;