- add nullptr checks for double-frame model interpolation

This commit is contained in:
Rachael Alexanderson 2019-06-12 10:21:43 -04:00
parent 7e901055ea
commit cb8c98827a

View file

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