mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-07 17:11:17 +00:00
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 } }
This commit is contained in:
parent
bba3027d37
commit
711471e9dd
1 changed files with 1 additions and 1 deletions
|
@ -344,7 +344,7 @@ public:
|
||||||
bool OwnsState(const FState *state)
|
bool OwnsState(const FState *state)
|
||||||
{
|
{
|
||||||
auto i = ActorInfo();
|
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);
|
PClassActor *GetReplacement(bool lookskill=true);
|
||||||
|
|
Loading…
Reference in a new issue