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.
This commit is contained in:
parent
0986992dbd
commit
d6f162dfa9
Notes:
blender-bot
2024-01-31 11:35:08 +01:00
Referenced by issue #90540, NoneType object error with entering grease pencil draw mode
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue