Correct initialization of bNodeSocket::default_attribute_name #111813

Closed
Eugene-Kuznetsov wants to merge 1 commits from Eugene-Kuznetsov/blender:socket_attr_fix into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 3 additions and 5 deletions

View File

@ -531,11 +531,9 @@ static void construct_interface_as_legacy_sockets(bNodeTree *ntree)
SET_FLAG_FROM_TEST(
iosock->flag, socket.flag & NODE_INTERFACE_SOCKET_HIDE_IN_MODIFIER, SOCK_HIDE_IN_MODIFIER);
iosock->attribute_domain = socket.attribute_domain;
if (socket.default_attribute_name) {
BLI_strncpy(iosock->default_attribute_name,
socket.default_attribute_name,
sizeof(iosock->default_attribute_name));
}
if (socket.default_attribute_name)
iosock->default_attribute_name = static_cast<char *>(MEM_dupallocN(
socket.default_attribute_name));
return iosock;
};