Fix T85541: crash when replacing an existing node link

It's not necessary to check if the link has to be removed,
if it was removed already.

This regression was caused by rB8f707a72e81833bb835324ddc635b29dfbe87a9f.
This commit is contained in:
Jacques Lucke 2021-02-11 11:50:12 +01:00
parent 8f707a72e8
commit 69e191604b
Notes: blender-bot 2023-02-14 05:53:42 +01:00
Referenced by issue #85541, Geometry Nodes - Connecting Geometry output to Geometry input causes Blender to crash
1 changed files with 2 additions and 2 deletions

View File

@ -732,8 +732,8 @@ static void node_remove_extra_links(SpaceNode *snode, bNodeLink *link)
tlink = NULL;
to_count--;
}
/* Also remove link if it comes from the same output. */
if (tlink->fromsock == from) {
else if (tlink->fromsock == from) {
/* Also remove link if it comes from the same output. */
nodeRemLink(ntree, tlink);
tlink = NULL;
to_count--;