Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-17 13:59:24 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-17 14:00:31 +0300
commit9f0f8aabe2ca751386390ecb4121a3ae04107676 (patch)
treed7c72d6e2184c17bee8ba9e938d6db21ff22a9cc /release/scripts/startup
parentc9d5d311ec52fccee1a1948810633d120351d9ce (diff)
Fix error with image editor toolsystem when switching to some workspaces.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py5
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):