Fix Python error when trying to call the Search Menu with no object #107310

Merged
Hans Goudey merged 1 commits from pioverfour/blender:dp_fix_context_modifier_poll into main 2023-04-24 20:47:25 +02:00
1 changed files with 2 additions and 0 deletions

View File

@ -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