Bugfix: Node operators were called in empty node editor, causing
NULL reading. Prevented it from happening with more strict poll()
This commit is contained in:
2009-02-10 15:51:33 +00:00
parent 25440893dd
commit 9b76b5e103

View File

@@ -148,7 +148,12 @@ int ED_operator_buttons_active(bContext *C)
int ED_operator_node_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_NODE);
if(ed_spacetype_test(C, SPACE_NODE)) {
SpaceNode *snode= (SpaceNode *)CTX_wm_space_data(C);
if(snode->edittree)
return 1;
}
return 0;
}
int ED_operator_ipo_active(bContext *C)