Fix T38969: RenderResult in RenderPart can be NULL if multithreaded
authorLukas Tönne <lukas.toenne@gmail.com>
Wed, 5 Mar 2014 16:42:48 +0000 (17:42 +0100)
committerLukas Tönne <lukas.toenne@gmail.com>
Wed, 5 Mar 2014 16:44:25 +0000 (17:44 +0100)
renders are cancelled early.

source/blender/editors/render/render_internal.c

index a842135ce7248310ce2c94030e39b28fc1065e42..35f17ec22af6e31084fee1283fb81a837104a9aa 100644 (file)
@@ -532,7 +532,10 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec
                *(rj->do_update) = TRUE;
                return;
        }
-
+       
+       if (rr == NULL)
+               return;
+       
        /* update part of render */
        render_image_update_pass_and_layer(rj, rr, &rj->iuser);
        ibuf = BKE_image_acquire_ibuf(ima, &rj->iuser, &lock);
@@ -550,7 +553,7 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec
                {
                        image_buffer_rect_update(rj, rr, ibuf, &rj->iuser, renrect);
                }
-
+               
                /* make jobs timer to send notifier */
                *(rj->do_update) = TRUE;
        }