From f45b91a1c5791c6f80f4790896e70b0fa9804da1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 16 Apr 2019 12:18:28 +0200 Subject: Fix tool system Python errors if there is no active object. --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index ed31a847933..71d6771c487 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -957,7 +957,7 @@ class _defs_vertex_paint: if context is None: return True ob = context.active_object - return (ob.type == 'MESH' and + return (ob and ob.type == 'MESH' and (ob.data.use_paint_mask or ob.data.use_paint_mask_vertex)) @@ -979,7 +979,7 @@ class _defs_texture_paint: if context is None: return True ob = context.active_object - return (ob.type == 'MESH' and + return (ob and ob.type == 'MESH' and (ob.data.use_paint_mask)) @staticmethod @@ -1000,7 +1000,7 @@ class _defs_weight_paint: if context is None: return True ob = context.active_object - return (ob.type == 'MESH' and + return (ob and ob.type == 'MESH' and (ob.data.use_paint_mask or ob.data.use_paint_mask_vertex)) -- cgit v1.2.3