Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-04-08 17:48:15 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-04-08 17:48:15 +0300
commit62f863b78a79474ef31362179800be7ff79f7510 (patch)
tree25856ae3e5e4de66bc9b0ef133bfd94396cd9413 /source/blender/nodes
parent7fcb0bf71e5ebb911a22ac628b74f26cf77f16ce (diff)
Fix memory leak in bump GLSL node
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bump.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_bump.c b/source/blender/nodes/shader/nodes/node_shader_bump.c
index de152ee45d1..3146454f26d 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 */