[Bf-blender-cvs] [bf54dcc] master: Fix T48589: Compositor Backdrop crashes Blender

Sergey Sharybin noreply at git.blender.org
Tue Jun 7 16:44:04 CEST 2016


Commit: bf54dcc3c952e207e7c8e7596069152307f61ea3
Author: Sergey Sharybin
Date:   Tue Jun 7 16:44:15 2016 +0200
Branches: master
https://developer.blender.org/rBbf54dcc3c952e207e7c8e7596069152307f61ea3

Fix T48589: Compositor Backdrop crashes Blender

===================================================================

M	source/blender/compositor/operations/COM_ImageOperation.cpp

===================================================================

diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp
index 624378f..7d59358 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_ImageOperation.cpp
@@ -160,10 +160,10 @@ static void sampleImageAtLocation(ImBuf *ibuf, float x, float y, PixelSampler sa
 void ImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
 {
 	int ix = x, iy = y;
-	if (ix < 0 || iy < 0 || ix >= this->m_buffer->x || iy >= this->m_buffer->y) {
+	if (this->m_imageFloatBuffer == NULL && this->m_imageByteBuffer == NULL) {
 		zero_v4(output);
 	}
-	else if (this->m_imageFloatBuffer == NULL && this->m_imageByteBuffer == NULL) {
+	else if (ix < 0 || iy < 0 || ix >= this->m_buffer->x || iy >= this->m_buffer->y) {
 		zero_v4(output);
 	}
 	else {




More information about the Bf-blender-cvs mailing list