Merged revision(s) 57908-57978 from trunk/blender into soc-2013-dingto.
[blender-staging.git] / source / blender / blenkernel / intern / node.c
index 170b4156b21a18787d8ec64b5de47c2a03151d0b..fbb0132965af9f18e930cbb05f3544da076b1cae 100644 (file)
@@ -2301,10 +2301,12 @@ static bNode *node_get_active_id_recursive(bNodeInstanceKey active_key, bNodeIns
                for (node = ntree->nodes.first; node; node = node->next) {
                        if (node->type == NODE_GROUP) {
                                bNodeTree *group = (bNodeTree *)node->id;
-                               bNodeInstanceKey group_key = BKE_node_instance_key(parent_key, ntree, node);
-                               tnode = node_get_active_id_recursive(active_key, group_key, group, idtype);
-                               if (tnode)
-                                       return tnode;
+                               if (group) {
+                                       bNodeInstanceKey group_key = BKE_node_instance_key(parent_key, ntree, node);
+                                       tnode = node_get_active_id_recursive(active_key, group_key, group, idtype);
+                                       if (tnode)
+                                               return tnode;
+                               }
                        }
                }
        }