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 Tönne <lukas.toenne@gmail.com>2014-01-07 13:54:31 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-01-07 13:54:31 +0400
commitebf23b51448e4bc9c67d656093ecc01be882c9d3 (patch)
treea0c0efdcac7fbb1506b44c7e5674f59f4cd43f5e /source/blender/editors/space_node
parent54ebaad377e70d1ee0270304fd5d0fda2103c800 (diff)
Fix T38075, crash from shader node add/replace tree view template.
The sanity check for copying socket default value was using the socket idname for type compatibility checks, which is too strict. Subtypes would not be recognized as copyable, but since only the plain data type is needed below this is all that needs to be checked. That alone would not cause crash (just missing default value copy), but the tree view template was messing with the default_value DNA directly by freeing it in advance, which is not necessary and should be left to blenkernel when freeing the node. Otherwise this would leave the node invalid without a default_value if the copy function bails out.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/node_templates.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index b544e753965..ac0010b1d55 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -246,10 +246,6 @@ static void node_socket_add_replace(const bContext *C, bNodeTree *ntree, bNode *
nodeRemLink(ntree, link);
}
- if (sock_from->default_value) {
- MEM_freeN(sock_from->default_value);
- sock_from->default_value = NULL;
- }
node_socket_copy_default_value(sock_from, sock_prev);
}
}