diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-01-13 03:02:37 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-01-13 03:02:37 +0300 |
commit | 75161c24c1e760e3b2bfcde8b0e1bd13524ce120 (patch) | |
tree | 1e9ecec8471f19c84c20838d768d6283e96f2bf6 /source/blender/imbuf/intern/rectop.c | |
parent | 59f8507a8747495a907c8b2c683d277e724df4a9 (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.c | 3 |
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; |