diff options
Diffstat (limited to 'source/blender/blenkernel/intern/image.cc')
-rw-r--r-- | source/blender/blenkernel/intern/image.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc index 44e0e7be97b..000e51c0150 100644 --- a/source/blender/blenkernel/intern/image.cc +++ b/source/blender/blenkernel/intern/image.cc @@ -5567,15 +5567,14 @@ bool BKE_image_remove_renderslot(Image *ima, ImageUser *iuser, int slot) next_last_slot = current_slot; } - if (!iuser) { + if (iuser == nullptr || iuser->scene == nullptr) { return false; } Render *re = RE_GetSceneRender(iuser->scene); - if (!re) { - return false; + if (re != nullptr) { + RE_SwapResult(re, ¤t_last_slot->render); + RE_SwapResult(re, &next_last_slot->render); } - RE_SwapResult(re, ¤t_last_slot->render); - RE_SwapResult(re, &next_last_slot->render); current_last_slot = next_last_slot; } |