diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-06 18:24:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-06 18:24:41 +0400 |
commit | 5f792b08e4115e4231f92f67cdc5ffde50473055 (patch) | |
tree | 837d05ddb6facfe484b68fdb9f9f7f3e41e46524 /source/blender/render/intern | |
parent | aa29ae6b4fcb7a199159a10f512195aae017b74c (diff) |
fix for rare crash we have with some mango files.
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r-- | source/blender/render/intern/source/external_engine.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c index 5bb3e4605a2..e3eab0c3b34 100644 --- a/source/blender/render/intern/source/external_engine.c +++ b/source/blender/render/intern/source/external_engine.c @@ -173,12 +173,16 @@ RenderResult *RE_engine_begin_result(RenderEngine *engine, int x, int y, int w, disprect.ymax = y + h; result = render_result_new(re, &disprect, 0, RR_USE_MEM); - BLI_addtail(&engine->fullresult, result); - - result->tilerect.xmin += re->disprect.xmin; - result->tilerect.xmax += re->disprect.xmin; - result->tilerect.ymin += re->disprect.ymin; - result->tilerect.ymax += re->disprect.ymin; + + /* can be NULL if we CLAMP the width or height to 0 */ + if (result) { + BLI_addtail(&engine->fullresult, result); + + result->tilerect.xmin += re->disprect.xmin; + result->tilerect.xmax += re->disprect.xmin; + result->tilerect.ymin += re->disprect.ymin; + result->tilerect.ymax += re->disprect.ymin; + } return result; } |