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:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-10-29 21:46:01 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-10-29 21:46:01 +0400
commit8bdbbca4858ab143661f371cc302092759e29408 (patch)
treee835ed51d977c07464fe0b4a1a9bfcb6dd0efa27 /source/blender/nodes/texture/nodes/node_texture_common.c
parent8d11abb0ec80a81dbdce1a1a1c163c2e314fb36f (diff)
Fix #37192, Rendered preview causes crash when deleting a material node in shader node editor. The 'free' callback for node execution data was accessed from the node->typeinfo, but this pointer can
become invalid because the render database is not immediately freed after the job finishes. To avoid access to dangling node pointers, store the function callback in the exec data itself. The node pointer must not be accessed in the free function (wasn't used before either), these functions are purely for the execution data.
Diffstat (limited to 'source/blender/nodes/texture/nodes/node_texture_common.c')
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c
index fec6abbf062..7e65c472eef 100644
--- a/source/blender/nodes/texture/nodes/node_texture_common.c
+++ b/source/blender/nodes/texture/nodes/node_texture_common.c
@@ -72,7 +72,7 @@ static void *group_initexec(bNodeExecContext *context, bNode *node, bNodeInstanc
return exec;
}
-static void group_freeexec(bNode *UNUSED(node), void *nodedata)
+static void group_freeexec(void *nodedata)
{
bNodeTreeExec *gexec = (bNodeTreeExec *)nodedata;