Fix error showing active tool side-bar in the image editor
authorCampbell Barton <ideasman42@gmail.com>
Mon, 20 May 2019 00:49:42 +0000 (10:49 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 20 May 2019 00:50:54 +0000 (10:50 +1000)
release/scripts/startup/bl_ui/space_toolsystem_common.py

index 4e7b5ea22d8f7502488139e461b6c891369b517c..c0bb50b6597373289923378719a50210bb600f5f 100644 (file)
@@ -567,11 +567,13 @@ class ToolSelectPanelHelper:
         if space_type is None:
             space_data = context.space_data
             space_type = space_data.type
+        else:
+            space_data = None
 
         if space_type == 'VIEW_3D':
             return space_type, context.mode
         elif space_type == 'IMAGE_EDITOR':
-            if space_type is None:
+            if space_data is None:
                 space_data = context.space_data
             return space_type, space_data.mode
         elif space_type == 'NODE_EDITOR':