fix for crash showing tooltip for NODE_OT_add_search()

This commit is contained in:
2012-08-17 11:31:54 +00:00
parent 219fb7ad79
commit dac761057d
3 changed files with 7 additions and 4 deletions

View File

@@ -57,10 +57,10 @@ def node_group_items(tree_type):
def node_type_items_cb(self, context):
snode = context.space_data
if not snode:
return []
return ()
tree = snode.edit_tree
if not tree:
return []
return ()
# Lists of basic node types for each
if not node_type_items_dict:
@@ -76,7 +76,7 @@ def node_type_items_cb(self, context):
if tree.type in node_type_items_dict:
return node_type_items_dict[tree.type] + node_group_items(tree.type)
else:
return []
return ()
class NODE_OT_add_search(Operator):