diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-10-29 21:46:01 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-10-29 21:46:01 +0400 |
commit | 8bdbbca4858ab143661f371cc302092759e29408 (patch) | |
tree | e835ed51d977c07464fe0b4a1a9bfcb6dd0efa27 /source/blender/nodes/intern/node_exec.h | |
parent | 8d11abb0ec80a81dbdce1a1a1c163c2e314fb36f (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/intern/node_exec.h')
-rw-r--r-- | source/blender/nodes/intern/node_exec.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/nodes/intern/node_exec.h b/source/blender/nodes/intern/node_exec.h index 7d76ef34934..4101c6c4c4d 100644 --- a/source/blender/nodes/intern/node_exec.h +++ b/source/blender/nodes/intern/node_exec.h @@ -51,6 +51,8 @@ struct bNodeStack; typedef struct bNodeExec { struct bNode *node; /* backpointer to node */ bNodeExecData data; + + NodeFreeExecFunction freeexecfunc; /* free function, stored in exec itself to avoid dangling node pointer access */ } bNodeExec; /* Execution Data for each instance of node tree execution */ |