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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2007-01-13 03:02:37 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2007-01-13 03:02:37 +0300
commit75161c24c1e760e3b2bfcde8b0e1bd13524ce120 (patch)
tree1e9ecec8471f19c84c20838d768d6283e96f2bf6 /source/blender/imbuf/intern/rectop.c
parent59f8507a8747495a907c8b2c683d277e724df4a9 (diff)
Fix for bug #5694:
Another issue with division by zero in texture paint, this time in torus wrapping.
Diffstat (limited to 'source/blender/imbuf/intern/rectop.c')
-rw-r--r--source/blender/imbuf/intern/rectop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c
index 429fcb109ea..bf459524c80 100644
--- a/source/blender/imbuf/intern/rectop.c
+++ b/source/blender/imbuf/intern/rectop.c
@@ -450,6 +450,9 @@ void IMB_rectblend_torus(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
{
int origw, origh, w, h;
+ if (dbuf->x == 0 || dbuf->y == 0 || sbuf->x == 0 || sbuf->y == 0)
+ return;
+
/* convert destination and source coordinates too be withing image */
destx = destx % dbuf->x;
if (destx < 0) destx += dbuf->x;