[Bf-blender-cvs] [ad68470d447] blender2.8: Fix exception running toolbar w/o an active space

Campbell Barton noreply at git.blender.org
Mon Sep 3 06:15:56 CEST 2018


Commit: ad68470d447dfb3864ed3e159dc0951bbf8547c6
Author: Campbell Barton
Date:   Mon Sep 3 14:22:58 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBad68470d447dfb3864ed3e159dc0951bbf8547c6

Fix exception running toolbar w/o an active space

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

M	release/scripts/startup/bl_operators/wm.py

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

diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index da4ba10a9bf..6a9b85eac27 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -2389,6 +2389,10 @@ class WM_OT_toolbar(Operator):
     bl_idname = "wm.toolbar"
     bl_label = "Toolbar"
 
+    @classmethod
+    def poll(cls, context):
+        return context.space_data is not None
+
     def execute(self, context):
         from bl_ui.space_toolsystem_common import (
             ToolSelectPanelHelper,



More information about the Bf-blender-cvs mailing list