Fix Python error when trying to call the Search Menu with no object #107310
|
@ -43,6 +43,8 @@ def get_context_modifier(context):
|
||||||
if context.area.type == 'PROPERTIES':
|
if context.area.type == 'PROPERTIES':
|
||||||
modifier = context.modifier
|
modifier = context.modifier
|
||||||
else:
|
else:
|
||||||
|
if context.object is None:
|
||||||
|
return False
|
||||||
modifier = context.object.modifiers.active
|
modifier = context.object.modifiers.active
|
||||||
if modifier is None or modifier.type != 'NODES':
|
if modifier is None or modifier.type != 'NODES':
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue