Fix exceptions in node operator poll functions

This commit is contained in:
Campbell Barton
2025-03-06 15:24:52 +11:00
parent 64ec0b3589
commit 1635595f94

View File

@@ -432,6 +432,7 @@ class NODE_OT_viewer_shortcut_set(Operator):
del cls
space = context.space_data
return (
(space is not None) and
space.type == 'NODE_EDITOR' and
space.node_tree is not None and
space.tree_type == 'CompositorNodeTree'
@@ -495,6 +496,7 @@ class NODE_OT_viewer_shortcut_get(Operator):
del cls
space = context.space_data
return (
(space is not None) and
space.type == 'NODE_EDITOR' and
space.node_tree is not None and
space.tree_type == 'CompositorNodeTree'