- add nullptr checks for double-frame model interpolation

This commit is contained in:
Rachael Alexanderson 2019-06-12 10:21:43 -04:00 committed by drfrag
parent 06c0dbe71e
commit fb326b2780

View file

@ -254,13 +254,13 @@ void FModelRenderer::RenderFrameModels(const FSpriteModelFrame *smf, const FStat
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);
}
}