From bee3d783939441946591f4b891394f0cf16cc12d Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Tue, 18 Jan 2011 13:28:18 +0000 Subject: [PATCH] Added a check in nodeGroupVerify to detect if a tree is actually a group tree. This is necessary to avoid the group-in-group error if the function is called for a tree that already contains group nodes. --- source/blender/blenkernel/intern/node.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index fd0edd83c7d..a6f03c0c3ec 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -615,6 +615,12 @@ bNode *nodeMakeGroupFromSelected(bNodeTree *ntree) /* should become callbackable... */ void nodeVerifyGroup(bNodeTree *ngroup) { + /* XXX nodeVerifyGroup is sometimes called for non-group trees. + * This is not the best way to check if a tree is a group, + * trees should get their own flag for this! + */ + if (!ngroup->owntype) + return; /* group changed, so we rebuild the type definition */ ntreeMakeOwnType(ngroup);