Fix error with image editor toolsystem when switching to some workspaces.
This commit is contained in:
parent
c9d5d311ec
commit
9f0f8aabe2
|
@ -1394,7 +1394,10 @@ class IMAGE_PT_tools_active(ToolSelectPanelHelper, Panel):
|
|||
@classmethod
|
||||
def tools_from_context(cls, context, mode=None):
|
||||
if mode is None:
|
||||
mode = context.space_data.mode
|
||||
if context.space_data is None:
|
||||
mode = context.space_data.mode
|
||||
else:
|
||||
mode = 'VIEW'
|
||||
for tools in (cls._tools[None], cls._tools.get(mode, ())):
|
||||
for item in tools:
|
||||
if not (type(item) is ToolDef) and callable(item):
|
||||
|
|
Loading…
Reference in New Issue