diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-16 01:13:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-16 01:13:26 +0300 |
commit | e75169974c58846312942509871c25bee17a5956 (patch) | |
tree | a689deef7e25c54221b039d4124d132a1bdbe5f2 /release | |
parent | 8a94425e966db6a043d7a9f2565e8b3eed0e4ffe (diff) |
Fix UI error in annotation tool
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 2e58e3e0bb4..a62c010e115 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -221,14 +221,15 @@ def _defs_annotate_factory(): layout.label(text="Annotation:") gpl = context.active_gpencil_layer - sub = layout.row(align=True) - sub.ui_units_x = 8 - - sub.prop(gpl, "color", text="") - sub.popover( - panel="TOPBAR_PT_annotation_layers", - text=text, - ) + if gpl is not None: + sub = layout.row(align=True) + sub.ui_units_x = 8 + + sub.prop(gpl, "color", text="") + sub.popover( + panel="TOPBAR_PT_annotation_layers", + text=text, + ) tool_settings = context.tool_settings space_type = tool.space_type |