Commit: 815c99938210a5bf72f8202dcdefd6d11df65c0b
Author: Jeroen Bakker
Date:   Mon May 12 18:21:45 2014 +0200
https://developer.blender.org/rB815c99938210a5bf72f8202dcdefd6d11df65c0b

Initialize colors, vectors and values in RenderLayersProg

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

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

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

diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp 
b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
index 672a9c2..f413734 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -81,8 +81,15 @@ void RenderLayersBaseProg::doInterpolation(float output[4], 
float x, float y, Pi
                case COM_PS_NEAREST: {
                        int ix = x;
                        int iy = y;
-                       if (ix < 0 || iy < 0 || ix >= width || iy >= height)
+                       if (ix < 0 || iy < 0 || ix >= width || iy >= height) {
+                               if (this->m_elementsize == 1)
+                                       output[0] = 0.0f;
+                               else if (this->m_elementsize == 3)
+                                       zero_v3(output);
+                               else
+                                       zero_v4(output);
                                break;
+                       }
 
                        offset = (iy * width + ix) * this->m_elementsize;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to