diff options
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_CropOperation.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_CropOperation.cpp b/source/blender/compositor/operations/COM_CropOperation.cpp index 925374c79ed..25a73799eff 100644 --- a/source/blender/compositor/operations/COM_CropOperation.cpp +++ b/source/blender/compositor/operations/COM_CropOperation.cpp @@ -114,5 +114,12 @@ void CropImageOperation::determineResolution(unsigned int resolution[2], unsigne void CropImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) { - this->m_inputOperation->read(output, (x + this->m_xmin), (y + this->m_ymin), sampler); + if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) + { + this->m_inputOperation->read(output, (x + this->m_xmin), (y + this->m_ymin), sampler); + } + else + { + zero_v4(output); + } } |