diff options
Diffstat (limited to 'source/blender/imbuf/intern/allocimbuf.c')
-rw-r--r-- | source/blender/imbuf/intern/allocimbuf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index fa823169966..32284472163 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -299,8 +299,12 @@ short imb_addrectImBuf(ImBuf *ibuf) int size; if(ibuf==NULL) return FALSE; - imb_freerectImBuf(ibuf); - + + /* don't call imb_freerectImBuf, it frees mipmaps, this call is used only too give float buffers display */ + if(ibuf->rect && (ibuf->mall & IB_rect)) + MEM_freeN(ibuf->rect); + ibuf->rect= NULL; + size = ibuf->x*ibuf->y; size = size*sizeof(unsigned int); |