diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-08-09 13:07:59 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-08-09 13:08:08 +0300 |
commit | d6f162dfa946e8745276ba594c29ce48b299a760 (patch) | |
tree | f1790fff04a7c11cac44a560bf416c946201cffd /release | |
parent | 0986992dbd0d85363f86079a7390632df9cb9d20 (diff) |
Fix T90540: NoneType object error with entering grease pencil draw mode
The preview was not ready when the panel was displayed.
Just need to check if None.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_paint_common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 97a0c5abf24..ad963396022 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -1141,7 +1141,7 @@ def brush_basic__draw_color_selector(context, layout, brush, gp_settings, props) if not gp_settings.use_material_pin: ma = context.object.active_material icon_id = 0 - if ma: + if ma and ma.id_data.preview: icon_id = ma.id_data.preview.icon_id txt_ma = ma.name maxw = 25 |