[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34761] trunk/blender/source/blender/imbuf /intern/allocimbuf.c: Bugfix #26001

Ton Roosendaal ton at blender.org
Thu Feb 10 16:47:55 CET 2011


Revision: 34761
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34761
Author:   ton
Date:     2011-02-10 15:47:55 +0000 (Thu, 10 Feb 2011)
Log Message:
-----------
Bugfix #26001

Adding a byte rect to float ImBuf was always freeing the mipmap levels.
Removed this convention since it crashes renders + image texture draw.

Proper ownership handling of ImBuf is high on the wish list :)

Modified Paths:
--------------
    trunk/blender/source/blender/imbuf/intern/allocimbuf.c

Modified: trunk/blender/source/blender/imbuf/intern/allocimbuf.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/allocimbuf.c	2011-02-10 14:59:17 UTC (rev 34760)
+++ trunk/blender/source/blender/imbuf/intern/allocimbuf.c	2011-02-10 15:47:55 UTC (rev 34761)
@@ -299,8 +299,12 @@
 	int size;
 
 	if(ibuf==NULL) return FALSE;
-	imb_freerectImBuf(ibuf);
-
+	
+	/* don't call imb_freerectImBuf, it frees mipmaps, this call is used only too give float buffers display */
+	if(ibuf->rect && (ibuf->mall & IB_rect))
+		MEM_freeN(ibuf->rect);
+	ibuf->rect= NULL;
+	
 	size = ibuf->x*ibuf->y;
 	size = size*sizeof(unsigned int);
 




More information about the Bf-blender-cvs mailing list