diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-17 13:59:24 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-17 14:00:31 +0300 |
commit | 9f0f8aabe2ca751386390ecb4121a3ae04107676 (patch) | |
tree | d7c72d6e2184c17bee8ba9e938d6db21ff22a9cc | |
parent | c9d5d311ec52fccee1a1948810633d120351d9ce (diff) |
Fix error with image editor toolsystem when switching to some workspaces.
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index d9586a0c15c..6ff02d0ab10 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -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): |