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

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--;