- Add missing null pointer check.

This commit is contained in:
drfrag 2021-09-24 00:54:07 +02:00 committed by Christoph Oelckers
parent 23477342c3
commit d84b44cbd1

View file

@ -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;