From f56bfbdd0c25feb815accdd377cf0b743c5d7e19 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 29 Apr 2009 16:07:10 +0000 Subject: [PATCH] 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. --- source/blender/blenkernel/intern/image.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 01d8ed4d41c..444c7c080ea 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -640,6 +640,11 @@ static uintptr_t image_mem_size(Image *ima) 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);