Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2011-02-10 18:47:55 +0300
committerTon Roosendaal <ton@blender.org>2011-02-10 18:47:55 +0300
commitd505b745fc155ee0e417418bd947db69719c4aea (patch)
treef1cc9aebf025e5d8c11b24b834ef4f56c65c34b9 /source/blender/imbuf
parentd240206c8853aa4a18f0e05087e3166e491cdf9c (diff)
Bugfix #26001
Adding a byte rect to float ImBuf was always freeing the mipmap levels. Removed this convention since it crashes renders + image texture draw. Proper ownership handling of ImBuf is high on the wish list :)
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c8
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);