forked from bartvdbraak/blender
Cleanup: redundant NULL checks
This commit is contained in:
parent
0b59865115
commit
5467260ce9
@ -646,7 +646,7 @@ static NlaTrack *nla_tweak_track_get(AnimData *adt)
|
|||||||
printf("%s: Active strip (%p, %s) not in NLA track found (%p, %s)\n",
|
printf("%s: Active strip (%p, %s) not in NLA track found (%p, %s)\n",
|
||||||
__func__,
|
__func__,
|
||||||
adt->actstrip, (adt->actstrip) ? adt->actstrip->name : "<None>",
|
adt->actstrip, (adt->actstrip) ? adt->actstrip->name : "<None>",
|
||||||
nlt, (nlt) ? nlt->name : "<None>");
|
nlt, nlt->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
/* 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 */
|
* can hang around when sequence render has rendered a 32 bits one before */
|
||||||
if (rv->rect32) {
|
MEM_SAFE_FREE(rv->rect32);
|
||||||
MEM_freeN(rv->rect32);
|
|
||||||
rv->rect32 = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (ibuf->rect) {
|
else if (ibuf->rect) {
|
||||||
if (!rv->rect32)
|
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);
|
memcpy(rv->rect32, ibuf->rect, 4 * rr->rectx * rr->recty);
|
||||||
|
|
||||||
/* Same things as above, old rectf can hang around from previous render. */
|
/* Same things as above, old rectf can hang around from previous render. */
|
||||||
if (rv->rectf) {
|
MEM_SAFE_FREE(rv->rectf);
|
||||||
MEM_freeN(rv->rectf);
|
|
||||||
rv->rectf = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* clean up non-view buffers */
|
/* clean up non-view buffers */
|
||||||
if (rr) {
|
MEM_SAFE_FREE(rr->rect32);
|
||||||
if (rr->rectf) {
|
MEM_SAFE_FREE(rr->rectf);
|
||||||
MEM_freeN(rr->rectf);
|
|
||||||
rr->rectf = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rr->rect32) {
|
|
||||||
MEM_freeN(rr->rect32);
|
|
||||||
rr->rect32 = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void render_result_rect_fill_zero(RenderResult *rr, const int view_id)
|
void render_result_rect_fill_zero(RenderResult *rr, const int view_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user