[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14359] trunk/blender/source/blender/src/ sequence.c: setting the blend value for a sequencer strip would crash when the strip had both char and float buffers .

Campbell Barton ideasman42 at gmail.com
Tue Apr 8 17:07:41 CEST 2008


Revision: 14359
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14359
Author:   campbellbarton
Date:     2008-04-08 17:07:40 +0200 (Tue, 08 Apr 2008)

Log Message:
-----------
setting the blend value for a sequencer strip would crash when the strip had both char and float buffers.

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

Modified: trunk/blender/source/blender/src/sequence.c
===================================================================
--- trunk/blender/source/blender/src/sequence.c	2008-04-08 13:40:05 UTC (rev 14358)
+++ trunk/blender/source/blender/src/sequence.c	2008-04-08 15:07:40 UTC (rev 14359)
@@ -670,12 +670,11 @@
 	int a, mul, icol;
 
 	mul= (int)(256.0*fmul);
-
-	a= ibuf->x*ibuf->y;
 	rt= (char *)ibuf->rect;
 	rt_float = ibuf->rect_float;
 
 	if (rt) {
+		a= ibuf->x*ibuf->y;
 		while(a--) {
 
 			icol= (mul*rt[0])>>8;
@@ -691,6 +690,7 @@
 		}
 	}
 	if (rt_float) {
+		a= ibuf->x*ibuf->y;
 		while(a--) {
 			rt_float[0] *= fmul;
 			rt_float[1] *= fmul;





More information about the Bf-blender-cvs mailing list