diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-07-03 19:33:14 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-07-03 19:33:14 +0400 |
commit | c9e56955cf9cb254b2832edc5e7722996b61d284 (patch) | |
tree | 296b0979c6c98c9d5d3398b8e486b07bd2237e0b /source/blender/compositor/operations/COM_WrapOperation.cpp | |
parent | 9b726219582f0344f2bdb1e4b4d2c014795a9c72 (diff) |
Fix deadlock in coordinate wrapping operation with zero dimension
Diffstat (limited to 'source/blender/compositor/operations/COM_WrapOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_WrapOperation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_WrapOperation.cpp b/source/blender/compositor/operations/COM_WrapOperation.cpp index 37a93520c7c..68c3e74a237 100644 --- a/source/blender/compositor/operations/COM_WrapOperation.cpp +++ b/source/blender/compositor/operations/COM_WrapOperation.cpp @@ -42,12 +42,14 @@ void WrapOperation::deinitExecution() inline float WrapOperation::getWrappedOriginalXPos(float x) { + if (this->getWidth() == 0) return 0; while (x < 0) x += this->m_width; return fmodf(x, this->getWidth()); } inline float WrapOperation::getWrappedOriginalYPos(float y) { + if (this->getHeight() == 0) return 0; while (y < 0) y += this->m_height; return fmodf(y, this->getHeight()); } |