GPencil: Remove script console warning when object is None
authorAntonioya <blendergit@gmail.com>
Sat, 13 Apr 2019 07:46:36 +0000 (09:46 +0200)
committerAntonioya <blendergit@gmail.com>
Sat, 13 Apr 2019 07:47:43 +0000 (09:47 +0200)
release/scripts/startup/bl_ui/space_topbar.py

index 25c715e..2e95ccd 100644 (file)
@@ -344,7 +344,7 @@ class _draw_left_context_mode:
             settings = tool_settings.gpencil_paint
             row.template_ID_preview(settings, "brush", rows=3, cols=8, hide_buttons=True)
 
-            if brush.gpencil_tool in {'FILL', 'DRAW'}:
+            if context.object and brush.gpencil_tool in {'FILL', 'DRAW'}:
                 draw_color_selector()
 
             from .properties_paint_common import (