fix for [#10458] Rc4 Blender crash when activate playback FPS than Alt+A to play animation.

This commit is contained in:
Campbell Barton 2008-05-05 06:30:19 +00:00
parent 65b2f4397c
commit 02afc94932

@ -3441,12 +3441,13 @@ static void draw_viewport_fps(ScrArea *sa)
tot++; tot++;
} }
} }
if (tot) {
redrawtime_index++; redrawtime_index++;
if (redrawtime_index >= REDRAW_FRAME_AVERAGE) if (redrawtime_index >= REDRAW_FRAME_AVERAGE)
redrawtime_index = 0; redrawtime_index = 0;
fps = fps / tot; fps = fps / tot;
}
#endif #endif
/* is this more then half a frame behind? */ /* is this more then half a frame behind? */
@ -3577,7 +3578,7 @@ void inner_play_anim_loop(int init, int mode)
while(redrawtime_index--) { while(redrawtime_index--) {
redrawtimes_fps[redrawtime_index] = 0.0; redrawtimes_fps[redrawtime_index] = 0.0;
} }
redrawtime_index = 0;
lredrawtime = 0.0; lredrawtime = 0.0;
return; return;
} }