diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-24 23:23:02 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-24 23:25:09 +0300 |
commit | a224ee00f5593bb4cce4beb3803eddfc05e82a6a (patch) | |
tree | 4dc0f08d0d3c2086cd727689e8d5bfb7f8d5bf62 /source/blender/editors/space_image/image_buttons.c | |
parent | 81a1b002a094cd88d584e956e48d562fbad31592 (diff) |
Fix missing render result release when alt-wheeling render pass menu
Diffstat (limited to 'source/blender/editors/space_image/image_buttons.c')
-rw-r--r-- | source/blender/editors/space_image/image_buttons.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 4c124db359e..f22152651e2 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -597,6 +597,7 @@ static bool ui_imageuser_pass_menu_step(bContext *C, int direction, void *rnd_pt rr = BKE_image_acquire_renderresult(scene, image); if (UNLIKELY(rr == NULL)) { + BKE_image_release_renderresult(scene, image); return false; } @@ -606,11 +607,13 @@ static bool ui_imageuser_pass_menu_step(bContext *C, int direction, void *rnd_pt rl = BLI_findlink(&rr->layers, layer); if (rl == NULL) { + BKE_image_release_renderresult(scene, image); return false; } rpass = BLI_findlink(&rl->passes, iuser->pass); if (rpass == NULL) { + BKE_image_release_renderresult(scene, image); return false; } @@ -631,8 +634,10 @@ static bool ui_imageuser_pass_menu_step(bContext *C, int direction, void *rnd_pt RenderPass *rp; int rp_index = 0; - if (iuser->pass == 0) + if (iuser->pass == 0) { + BKE_image_release_renderresult(scene, image); return false; + } for (rp = rl->passes.first; rp; rp = rp->next, rp_index++) { if (rp->passtype == rpass->passtype) { @@ -646,6 +651,8 @@ static bool ui_imageuser_pass_menu_step(bContext *C, int direction, void *rnd_pt BLI_assert(0); } + BKE_image_release_renderresult(scene, image); + if (changed) { BKE_image_multilayer_index(rr, iuser); WM_event_add_notifier(C, NC_IMAGE | ND_DRAW, NULL); |