diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-05-14 03:38:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-05-14 03:38:02 +0300 |
commit | 88841559de55ee833b04ae2d1812e1be60edca86 (patch) | |
tree | 35eb7737f1dd37f2bf7b0370e43666edf5755785 /source/blender/blenkernel/intern | |
parent | e2eb47191dc30d010eb4420f486b45824af811be (diff) |
Fix T66005: crash deleting render slot while rendering to it
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index ee1bd5afa61..906d76dfed8 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -5726,6 +5726,13 @@ RenderSlot *BKE_image_add_renderslot(Image *ima, const char *name) bool BKE_image_remove_renderslot(Image *ima, ImageUser *iuser, int index) { + if (index == ima->last_render_slot) { + /* Don't remove render slot while rendering to it. */ + if (G.is_rendering) { + return false; + } + } + int num_slots = BLI_listbase_count(&ima->renderslots); if (index >= num_slots || num_slots == 1) { return false; |