diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2015-04-17 16:41:31 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2015-04-17 16:41:31 +0300 |
commit | 80b4b437275646c8d10910880f31783dc26a8948 (patch) | |
tree | 477bb64ef63cc77b3d3125348a1faaeceea0a29e /source/blender/editors/space_image | |
parent | cd729e9a4ee16300ccf9ec47c73af440d195c792 (diff) |
Code cleanup (for previous commit)
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_buttons.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index cb490eb03a7..c398d32dad5 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -552,14 +552,16 @@ static void image_multi_incpass_cb(bContext *C, void *rr_v, void *iuser_v) RenderPass *next = NULL; int layer = iuser->layer; - if (RE_HasFakeLayer(rr)) layer -= 1; + if (RE_HasFakeLayer(rr)) + layer -= 1; + rl = BLI_findlink(&rr->layers, layer); if (rl) { for (rp = rl->passes.first; rp; rp = rp->next) { if (rp->passtype == iuser->passtype) { next = rp->next; - if (next && (next->passtype == rp->passtype)) + if (next != NULL && next->passtype == rp->passtype) next = next->next; break; } @@ -581,14 +583,16 @@ static void image_multi_decpass_cb(bContext *C, void *rr_v, void *iuser_v) RenderPass *prev= NULL; int layer = iuser->layer; - if (RE_HasFakeLayer(rr)) layer -= 1; + if (RE_HasFakeLayer(rr)) + layer -= 1; + rl = BLI_findlink(&rr->layers, layer); if (rl) { for (rp = rl->passes.last; rp; rp = rp->prev) { if (rp->passtype == iuser->passtype) { prev = rp->prev; - if (prev && (prev->passtype == rp->passtype)) + if (prev != NULL && prev->passtype == rp->passtype) prev = prev->prev; break; } |