From 4b784f4311f724e983de32799e27d03ab199abb4 Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Thu, 14 Feb 2008 15:14:01 +0000 Subject: stupid me! if you move var declarations sometimes you have to add assignments outside of the var declarations! --- source/blender/nodes/intern/CMP_nodes/CMP_image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/nodes') diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c index 9a2f6fc3df8..6a82e8a9254 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c @@ -205,7 +205,7 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **in, b /*respect image premul option*/ if (stackbuf->type==CB_RGBA && ima->flag & IMA_DO_PREMUL) { int i; - float *pixel = stackbuf->rect; + float *pixel; /*first duplicate stackbuf->rect, since it's just a pointer to the source imbuf, and we don't want to change that.*/ @@ -213,6 +213,7 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **in, b /*premul the image*/ + pixel = stackbuf->rect; for (i=0; ix*stackbuf->y; i++, pixel += 4) { pixel[0] *= pixel[3]; pixel[1] *= pixel[3]; -- cgit v1.2.3