Fix: Crash when deleting node

Caused by b4c3ea2644 not removing the
dangling pointers to the freed internal links from the vector.
This commit is contained in:
Hans Goudey 2022-11-18 13:58:36 -06:00
parent 21adf2ec89
commit ab819517fc
Notes: blender-bot 2023-02-14 02:27:51 +01:00
Referenced by issue #102603, Duplicating Shader Nodes crashes Blender
1 changed files with 1 additions and 0 deletions

View File

@ -1195,6 +1195,7 @@ class NodeTreeMainUpdater {
for (bNodeLink *link : node.runtime->internal_links) {
MEM_freeN(link);
}
node.runtime->internal_links.clear();
for (const auto &item : links) {
bNodeSocket *from_socket = item.first;
bNodeSocket *to_socket = item.second;