Fix T38969: RenderResult in RenderPart can be NULL if multithreaded

renders are cancelled early.
This commit is contained in:
Lukas Tönne 2014-03-05 17:42:48 +01:00
parent a8dc5b274b
commit 8e7ec3652e
Notes: blender-bot 2023-02-14 11:04:58 +01:00
Referenced by issue #38969, Crash (regression) when rendering a flex rig character
1 changed files with 5 additions and 2 deletions

View 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;
}