From cdb8e3956517cf3bb6a4de5e6b0884cb28bd98ee Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 12 Feb 2013 15:58:06 +0000 Subject: Fix for own multilayer EXR fix, should not have caused any issues might as well make sure it works if this function gets called from other places. --- source/blender/imbuf/intern/rectop.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source/blender/imbuf/intern/rectop.c') diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index cae705ae798..0b739b9fe92 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -595,12 +595,8 @@ void IMB_rectfill_alpha(ImBuf *ibuf, const float value) { int i; - if (ibuf->rect_float) { - float *fbuf; - - if (ibuf->channels != 4) return; - - fbuf = ibuf->rect_float + 3; + if (ibuf->rect_float && (ibuf->channels == 4)) { + float *fbuf = ibuf->rect_float + 3; for (i = ibuf->x * ibuf->y; i > 0; i--, fbuf += 4) { *fbuf = value; } } -- cgit v1.2.3