diff --git a/src/r_data/models/models.cpp b/src/r_data/models/models.cpp index 1779d2d94..4d4471717 100644 --- a/src/r_data/models/models.cpp +++ b/src/r_data/models/models.cpp @@ -251,13 +251,13 @@ void FModelRenderer::RenderFrameModels(FLevelLocals *Level, const FSpriteModelFr inter /= 2.; inter += 0.5; } - if ((curState->sprite == nextState->sprite) && (curState->Frame == nextState->Frame)) + if (nextState && ((curState->sprite == nextState->sprite) && (curState->Frame == nextState->Frame))) { inter /= 2.; nextState = nextState->GetNextState(); } } - if (inter != 0.0) + if (nextState && inter != 0.0) smfNext = FindModelFrame(ti, nextState->sprite, nextState->Frame, false); } }