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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user