diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-09 10:19:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-09 10:20:02 +0300 |
commit | 5467260ce9af14d8bd4d88758e1925c88dafa8c8 (patch) | |
tree | aeed4d4a93425f943dc683878400d3e2546475e2 /source/blender/render/intern | |
parent | 0b598651154ddaaff4ae721e1627b1f99de67d94 (diff) |
Cleanup: redundant NULL checks
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r-- | source/blender/render/intern/source/render_result.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c index 90f6eab0cc1..9ae394fa675 100644 --- a/source/blender/render/intern/source/render_result.c +++ b/source/blender/render/intern/source/render_result.c @@ -1512,10 +1512,7 @@ void render_result_rect_from_ibuf(RenderResult *rr, RenderData *UNUSED(rd), ImBu /* TSK! Since sequence render doesn't free the *rr render result, the old rect32 * can hang around when sequence render has rendered a 32 bits one before */ - if (rv->rect32) { - MEM_freeN(rv->rect32); - rv->rect32 = NULL; - } + MEM_SAFE_FREE(rv->rect32); } else if (ibuf->rect) { if (!rv->rect32) @@ -1524,24 +1521,12 @@ void render_result_rect_from_ibuf(RenderResult *rr, RenderData *UNUSED(rd), ImBu memcpy(rv->rect32, ibuf->rect, 4 * rr->rectx * rr->recty); /* Same things as above, old rectf can hang around from previous render. */ - if (rv->rectf) { - MEM_freeN(rv->rectf); - rv->rectf = NULL; - } + MEM_SAFE_FREE(rv->rectf); } /* clean up non-view buffers */ - if (rr) { - if (rr->rectf) { - MEM_freeN(rr->rectf); - rr->rectf = NULL; - } - - if (rr->rect32) { - MEM_freeN(rr->rect32); - rr->rect32 = NULL; - } - } + MEM_SAFE_FREE(rr->rect32); + MEM_SAFE_FREE(rr->rectf); } void render_result_rect_fill_zero(RenderResult *rr, const int view_id) |