fix [#29887] Alt + g in a node group results in crash

This commit is contained in:
Campbell Barton 2012-01-14 18:11:45 +00:00
parent 8b39ed9458
commit 5c93135ef9

@ -530,7 +530,8 @@ int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
BLI_addtail(&ntree->links, link);
}
/* and copy across the animation */
/* and copy across the animation,
* note that the animation data's action can be NULL here */
if (wgroup->adt) {
LinkData *ld, *ldn=NULL;
bAction *waction;
@ -550,7 +551,9 @@ int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
}
/* free temp action too */
free_libblock(&G.main->action, waction);
if (waction) {
free_libblock(&G.main->action, waction);
}
}
/* delete the group instance. this also removes old input links! */