fix crash for bad QVector index

This commit is contained in:
Andrew Meadows 2017-12-18 11:05:27 -08:00
parent f8cef6631b
commit 661a63bd0c

View file

@ -998,7 +998,7 @@ void ModelEntityRenderer::animate(const TypedEntityPointer& entity) {
// in the case where the last frame is greater than the framecount then clamp
// it to the end of the animation until it loops around.
if (animationCurrentFrame < 0 || animationCurrentFrame > frameCount) {
if (animationCurrentFrame < 0 || animationCurrentFrame >= frameCount) {
animationCurrentFrame = 0;
}