diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-05-30 15:51:21 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-05-30 15:51:21 +0400 |
commit | 281e538be0c3d55efaa9461e38231a07cc2db15b (patch) | |
tree | 37471e740dbb90d8bbaea4e74793b125178c8de5 /source/blender/blenloader | |
parent | 79f5a013be6efff5484b9a4cd6f9d7be0b7232af (diff) |
Fix #35570, old group nodes with empty socket name strings crash. The identifier assignment was not taking potentially empty name strings into account. In addition some of the BLI_uniquename calls were
not passing a valid defname parameter, also crashing.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 812e8df389a..7f1f00431d3 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7770,20 +7770,20 @@ static void do_versions_nodetree_customnodes(bNodeTree *ntree, int UNUSED(is_gro for (node=ntree->nodes.first; node; node=node->next) { for (sock = node->inputs.first; sock; sock = sock->next) { BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier)); - BLI_uniquename(&node->inputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier)); + BLI_uniquename(&node->inputs, sock, "socket", '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier)); } for (sock = node->outputs.first; sock; sock = sock->next) { BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier)); - BLI_uniquename(&node->outputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier)); + BLI_uniquename(&node->outputs, sock, "socket", '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier)); } } for (sock = ntree->inputs.first; sock; sock = sock->next) { BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier)); - BLI_uniquename(&ntree->inputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier)); + BLI_uniquename(&ntree->inputs, sock, "socket", '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier)); } for (sock = ntree->outputs.first; sock; sock = sock->next) { BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier)); - BLI_uniquename(&ntree->outputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier)); + BLI_uniquename(&ntree->outputs, sock, "socket", '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier)); } } } |