From 18d7a2316678ae7074a7f50c48453933ca7a5fb4 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Thu, 12 Jul 2012 15:14:50 +0000 Subject: Fix #32051, Ungroup operator crashes. The link iterator can be invalidated when unconnected input links are removed. --- source/blender/editors/space_node/node_edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 7d76994c07a..c4e72fa4a51 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -1200,7 +1200,8 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode) nodeRemLink(wgroup, link); } /* restore links from internal nodes */ - for (link = wgroup->links.first; link; link = link->next) { + for (link = wgroup->links.first; link; link = linkn) { + linkn = link->next; /* indicates link to group input */ if (!link->fromnode) { /* NB: can't use find_group_node_input here, -- cgit v1.2.3