Skip to content
Permalink
Browse files

- add nullptr checks for double-frame model interpolation

  • Loading branch information...
madame-rachelle committed Jun 12, 2019
1 parent 7e90105 commit cb8c98827ace46c505ebc950f3d920a0b5d527f4
Showing with 2 additions and 2 deletions.
  1. +2 −2 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);
}
}

0 comments on commit cb8c988

Please sign in to comment.
You can’t perform that action at this time.