[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19976] trunk/blender/source/blender/ blenkernel/intern/image.c: Bugfix from own testing:

Ton Roosendaal ton at blender.org
Wed Apr 29 18:07:11 CEST 2009


Revision: 19976
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19976
Author:   ton
Date:     2009-04-29 18:07:10 +0200 (Wed, 29 Apr 2009)

Log Message:
-----------
Bugfix from own testing:

Blender crashed, when started in debug -d, with compositor, after render.
Reason was the BKE_image_print_memlist() which reads the ibuf->rect from
all images, but for Image types "VIEWER" that's not valid, this data is
coming from other sources.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/image.c

Modified: trunk/blender/source/blender/blenkernel/intern/image.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/image.c	2009-04-29 15:25:13 UTC (rev 19975)
+++ trunk/blender/source/blender/blenkernel/intern/image.c	2009-04-29 16:07:10 UTC (rev 19976)
@@ -640,6 +640,11 @@
 	uintptr_t size = 0;
 
 	size= 0;
+	
+	/* viewers have memory depending on other rules, has no valid rect pointer */
+	if(ima->source==IMA_SRC_VIEWER)
+		return 0;
+	
 	for(ibuf= ima->ibufs.first; ibuf; ibuf= ibuf->next) {
 		if(ibuf->rect) size += MEM_allocN_len(ibuf->rect);
 		else if(ibuf->rect_float) size += MEM_allocN_len(ibuf->rect_float);





More information about the Bf-blender-cvs mailing list