[Bf-blender-cvs] [9f0f8aabe2c] blender2.8: Fix error with image editor toolsystem when switching to some workspaces.

Brecht Van Lommel noreply at git.blender.org
Fri Aug 17 13:03:23 CEST 2018


Commit: 9f0f8aabe2ca751386390ecb4121a3ae04107676
Author: Brecht Van Lommel
Date:   Fri Aug 17 12:59:24 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB9f0f8aabe2ca751386390ecb4121a3ae04107676

Fix error with image editor toolsystem when switching to some workspaces.

===================================================================

M	release/scripts/startup/bl_ui/space_toolsystem_toolbar.py

===================================================================

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):



More information about the Bf-blender-cvs mailing list