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:
-rw-r--r--source/blender/editors/interface/interface_icons.c8
-rw-r--r--source/blender/imbuf/intern/scaling.c2
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);
}