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:
Diffstat (limited to 'source/blender/imbuf/intern/scaling.c')
-rw-r--r--source/blender/imbuf/intern/scaling.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index b9525ccccf1..1e701b8d615 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -1467,10 +1467,10 @@ struct ImBuf *IMB_scaleImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned int
return ibuf;
}
- if (newx < ibuf->x) if (newx) scaledownx(ibuf, newx);
- if (newy < ibuf->y) if (newy) scaledowny(ibuf, newy);
- if (newx > ibuf->x) if (newx) scaleupx(ibuf, newx);
- if (newy > ibuf->y) if (newy) scaleupy(ibuf, newy);
+ if (newx && (newx < ibuf->x)) scaledownx(ibuf, newx);
+ if (newy && (newy < ibuf->y)) scaledowny(ibuf, newy);
+ if (newx && (newx > ibuf->x)) scaleupx(ibuf, newx);
+ if (newy && (newy > ibuf->y)) scaleupy(ibuf, newy);
return(ibuf);
}