From 1635595f94be2684937f2976454c59a79362416a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 6 Mar 2025 15:24:52 +1100 Subject: [PATCH] Fix exceptions in node operator poll functions --- scripts/startup/bl_operators/node.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/startup/bl_operators/node.py b/scripts/startup/bl_operators/node.py index f40e159a686..92cefacabbb 100644 --- a/scripts/startup/bl_operators/node.py +++ b/scripts/startup/bl_operators/node.py @@ -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'