From 711471e9dd9df2af58f097b4248b3200a86d8c28 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 1 Mar 2018 11:08:38 +0200 Subject: [PATCH] Fixed potential crash during state validation https://forum.zdoom.org/viewtopic.php?t=57116 The problem was caused by missing state label in conjunction with incomplete class actor A : ArmorBonus { Inventory.ForbiddenTo "Missing" } actor B : Pistol { states { TNT1 A 0 Loop } } --- src/info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.h b/src/info.h index 8bd188730..69912534f 100644 --- a/src/info.h +++ b/src/info.h @@ -344,7 +344,7 @@ public: bool OwnsState(const FState *state) { auto i = ActorInfo(); - return state >= i->OwnedStates && state < i->OwnedStates + i->NumOwnedStates; + return i != nullptr && state >= i->OwnedStates && state < i->OwnedStates + i->NumOwnedStates; } PClassActor *GetReplacement(bool lookskill=true);