[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14687] trunk/blender/source/blender/src/ drawview.c: fix for [#10458] Rc4 Blender crash when activate playback FPS than Alt+A to play animation.

Campbell Barton ideasman42 at gmail.com
Mon May 5 08:30:20 CEST 2008


Revision: 14687
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14687
Author:   campbellbarton
Date:     2008-05-05 08:30:19 +0200 (Mon, 05 May 2008)

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

Modified Paths:
--------------
    trunk/blender/source/blender/src/drawview.c

Modified: trunk/blender/source/blender/src/drawview.c
===================================================================
--- trunk/blender/source/blender/src/drawview.c	2008-05-05 01:46:35 UTC (rev 14686)
+++ trunk/blender/source/blender/src/drawview.c	2008-05-05 06:30:19 UTC (rev 14687)
@@ -3441,12 +3441,13 @@
 			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 @@
 		while(redrawtime_index--) {
 			redrawtimes_fps[redrawtime_index] = 0.0;
 		}
-		
+		redrawtime_index = 0;
 		lredrawtime = 0.0;
 		return;
 	}





More information about the Bf-blender-cvs mailing list