Fix T64786: dynamic spacebar menu gives error without an active object

This commit is contained in:
Brecht Van Lommel 2019-05-18 13:03:36 +02:00
parent 8d30ed32b4
commit 2ce7a5d85c
Notes: blender-bot 2023-02-14 19:15:30 +01:00
Referenced by issue #64786, Push the Space Bar key for Mac only.
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
view = context.space_data
# No Object Selected #
ob = bpy.context.object
if not ob.select_get():
if not ob or not ob.select_get():
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("wm.search_menu", text="Search", icon='VIEWZOOM')