diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2015-04-23 16:59:35 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2015-04-23 17:01:56 +0300 |
commit | 22b564f93ef4bd7c981a7986addf5fe466954592 (patch) | |
tree | 8690e1dafdd1c21676ad434c3adc62d56df290f1 /source/blender/blenkernel/intern/image.c | |
parent | bcac112dde72a82180ed26d1fddea08766a0a788 (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 16 |
1 files changed, 12 insertions, 4 deletions
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 */ |