Commit: 62f863b78a79474ef31362179800be7ff79f7510
Author: Antony Riakiotakis
Date: Wed Apr 8 16:48:15 2015 +0200
Branches: master
https://developer.blender.org/rB62f863b78a79474ef31362179800be7ff79f7510
Fix memory leak in bump GLSL node
===================================================================
M source/blender/nodes/shader/nodes/node_shader_bump.c
===================================================================
diff --git a/source/blender/nodes/shader/nodes/node_shader_bump.c
b/source/blender/nodes/shader/nodes/node_shader_bump.c
index de152ee..3146454 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bump.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bump.c
@@ -47,7 +47,10 @@ static bNodeSocketTemplate sh_node_bump_out[] = {
static int gpu_shader_bump(GPUMaterial *mat, bNode *UNUSED(node),
bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
- return GPU_stack_link(mat, "node_bump", in, out,
GPU_builtin(GPU_VIEW_NORMAL));
+ if (!in[3].link)
+ in[3].link = GPU_builtin(GPU_VIEW_NORMAL);
+
+ return GPU_stack_link(mat, "node_bump", in, out);
}
/* node type definition */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs