diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-05-05 10:30:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-05-05 10:30:19 +0400 |
commit | 02afc949322950af19923df65b359215495abac7 (patch) | |
tree | 39816484b28705c51257f32b7595a5c535dfa1ce /source | |
parent | 65b2f4397c4280c12ebc50c8bf957641e0d73f41 (diff) |
fix for [#10458] Rc4 Blender crash when activate playback FPS than Alt+A to play animation.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/drawview.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index b0d25636cf2..b01b7bc151c 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -3441,12 +3441,13 @@ static void draw_viewport_fps(ScrArea *sa) tot++; } } - - redrawtime_index++; - if (redrawtime_index >= REDRAW_FRAME_AVERAGE) - redrawtime_index = 0; - - fps = fps / tot; + if (tot) { + redrawtime_index++; + if (redrawtime_index >= REDRAW_FRAME_AVERAGE) + redrawtime_index = 0; + + fps = fps / tot; + } #endif /* is this more then half a frame behind? */ @@ -3577,7 +3578,7 @@ void inner_play_anim_loop(int init, int mode) while(redrawtime_index--) { redrawtimes_fps[redrawtime_index] = 0.0; } - + redrawtime_index = 0; lredrawtime = 0.0; return; } |