[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16428] trunk/blender/source/blender/nodes /intern/CMP_nodes/CMP_tonemap.c: Bugfix #13837

Ton Roosendaal ton at blender.org
Tue Sep 9 12:16:10 CEST 2008


Revision: 16428
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16428
Author:   ton
Date:     2008-09-09 12:16:09 +0200 (Tue, 09 Sep 2008)

Log Message:
-----------
Bugfix #13837

Tonemap didn't correctly accept any buffer type.
The coder who added this should check this fix! Any node coder maybe...

Modified Paths:
--------------
    trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c

Modified: trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c	2008-09-08 23:39:32 UTC (rev 16427)
+++ trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c	2008-09-09 10:16:09 UTC (rev 16428)
@@ -130,13 +130,16 @@
 	if ((img==NULL) || (out[0]->hasoutput==0)) return;
 
 	if (img->type != CB_RGBA)
-		new = typecheck_compbuf(img, CB_RGBA);
-	else
-		new = dupalloc_compbuf(img);
+		img = typecheck_compbuf(img, CB_RGBA);
+	
+	new = dupalloc_compbuf(img);
 
 	tonemap(node->storage, new, img);
 
 	out[0]->data = new;
+	
+	if(img!=in[0]->data)
+		free_compbuf(img);
 }
 
 static void node_composit_init_tonemap(bNode* node)





More information about the Bf-blender-cvs mailing list