Fix crash with DecoupledModels flag defined but no actual model

This commit is contained in:
Ricardo Luís Vaz Silva 2024-03-14 18:51:42 -03:00 committed by Christoph Oelckers
parent 520b960ca5
commit 0092aa0772

View file

@ -1124,7 +1124,7 @@ FSpriteModelFrame * FindModelFrame(const AActor * thing, int sprite, int frame,
if(thing->flags9 & MF9_DECOUPLEDANIMATIONS)
{
return &BaseSpriteModelFrames[(thing->modelData != nullptr && thing->modelData->modelDef != nullptr) ? thing->modelData->modelDef : thing->GetClass()];
return BaseSpriteModelFrames.CheckKey((thing->modelData != nullptr && thing->modelData->modelDef != nullptr) ? thing->modelData->modelDef : thing->GetClass());
}
else
{