From 05424aeb54b1fbcae70cf7618bc19ce65ab6ee63 Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Mon, 24 Apr 2023 20:21:40 +0200 Subject: [PATCH] Fix Python error when trying to call the Search Menu with no object When pressing F3 to bring up the Search Menu, an error appeared because the MoveModifierToNodes operator's poll method did not consider the context where no object was selected. --- scripts/startup/bl_operators/geometry_nodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/startup/bl_operators/geometry_nodes.py b/scripts/startup/bl_operators/geometry_nodes.py index 7b8c339cd68..d3f2db25b71 100644 --- a/scripts/startup/bl_operators/geometry_nodes.py +++ b/scripts/startup/bl_operators/geometry_nodes.py @@ -43,6 +43,8 @@ def get_context_modifier(context): if context.area.type == 'PROPERTIES': modifier = context.modifier else: + if context.object is None: + return False modifier = context.object.modifiers.active if modifier is None or modifier.type != 'NODES': return None -- 2.30.2