diff options
author | Ton Roosendaal <ton@blender.org> | 2012-12-28 14:38:07 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2012-12-28 14:38:07 +0400 |
commit | 914b0aafa5693f5808f14522dcc57d9f2a695db0 (patch) | |
tree | e0ec9eb82d98f15926ab89ced8be5829a58d5855 /source/blender | |
parent | 6061ecca0baa0e67aa299ede7ecaf46bc833875c (diff) |
Yesterday's memory free error fix in IMB_onehalf was wrong, it should
be fixed in the icons code!
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 8 | ||||
-rw-r--r-- | source/blender/imbuf/intern/scaling.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 31d1ad7a955..d146fe25187 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -575,9 +575,11 @@ static void init_internal_icons(void) glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA, b16buf->x, b16buf->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, b16buf->rect); while (b16buf->x > 1) { - b16buf = IMB_onehalf(b16buf); - glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA, b16buf->x, b16buf->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, b16buf->rect); + ImBuf *nbuf = IMB_onehalf(b16buf); + glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA, nbuf->x, nbuf->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, nbuf->rect); level++; + IMB_freeImBuf(b16buf); + b16buf = nbuf; } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); @@ -598,7 +600,7 @@ static void init_internal_icons(void) else icontype = ICON_TYPE_BUFFER; - if (b16buf) { + if (b32buf) { for (y = 0; y < ICON_GRID_ROWS; y++) { for (x = 0; x < ICON_GRID_COLS; x++) { def_internal_icon(b32buf, BIFICONID_FIRST + y * ICON_GRID_COLS + x, diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index af51b4448aa..1e701b8d615 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -360,8 +360,6 @@ ImBuf *IMB_onehalf(struct ImBuf *ibuf1) imb_onehalf_no_alloc(ibuf2, ibuf1); - IMB_freeImBuf(ibuf1); - return (ibuf2); } |