From 57eb8539fc5cab771828143dbfd100013b18db6e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 29 Apr 2016 17:37:00 +0200 Subject: Fix crash (segfault) in node editor. In some cases, we can have nodegroups without attached nodetree, this case is checked in top `node_group_has_output()` entry point, but not in recursive `node_group_has_output_dfs()`. Issue appeared after rB42824f4403db3a35, presumably because check on node flag itself was skipping that case, which is no more possible when using ID tags. Reported by sebastian_k over IRC, thanks. --- source/blender/editors/space_node/node_relationships.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_node') diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 07e79c5a59c..4abc7f5e71b 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -107,7 +107,7 @@ static bool node_group_has_output_dfs(bNode *node) current_node = current_node->next) { if (current_node->type == NODE_GROUP) { - if (node_group_has_output_dfs(current_node)) { + if (current_node->id && node_group_has_output_dfs(current_node)) { return true; } } -- cgit v1.2.3