[Bf-blender-cvs] [22b564f] master: Fix T44498 - Blender crashes in some files after render slots fix

Dalai Felinto noreply at git.blender.org
Thu Apr 23 16:02:31 CEST 2015


Commit: 22b564f93ef4bd7c981a7986addf5fe466954592
Author: Dalai Felinto
Date:   Thu Apr 23 10:59:35 2015 -0300
Branches: master
https://developer.blender.org/rB22b564f93ef4bd7c981a7986addf5fe466954592

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.

===================================================================

M	source/blender/blenkernel/intern/image.c

===================================================================

diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index d743c06..b9a76a1 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 */




More information about the Bf-blender-cvs mailing list