From 22b564f93ef4bd7c981a7986addf5fe466954592 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Thu, 23 Apr 2015 10:59:35 -0300 Subject: Fix T44498 - Blender crashes in some files after render slots fix This is a temporary fix until I get to investigate it more carefully. It will help if the report could include the steps to reproduce it besides the buggy file. Note: RenderResult should *always* have at least a valid RenderView, which is not what happens here. --- source/blender/blenkernel/intern/image.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index d743c067cb3..b9a76a125a4 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -3575,10 +3575,18 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_ if (rv == NULL) rv = rres.views.first; - /* this gives active layer, composite or sequence result */ - rect = (unsigned int *)rv->rect32; - rectf = rv->rectf; - rectz = rv->rectz; + if (rv != NULL) { + /* this gives active layer, composite or sequence result */ + rect = (unsigned int *)rv->rect32; + rectf = rv->rectf; + rectz = rv->rectz; + } + else { + /* XXX This should never happen, yet it does - T44498 + * I'm waiting to investigate more, but meanwhile this fix + * the immediate issue */ + rect = NULL; + } dither = iuser->scene->r.dither_intensity; /* combined layer gets added as first layer */ -- cgit v1.2.3