GPencil: Fix unreported missing stroke color for 1st popover material

This commit is contained in:
Antonio Vazquez 2019-10-30 22:42:06 +01:00
parent d9bce6bcf5
commit ed079850cb
Notes: blender-bot 2023-02-14 00:20:19 +01:00
Referenced by issue #71260, GPencil: Blender crashes after Malloc returns null while drawing a line when use lot of points
1 changed files with 1 additions and 1 deletions

View File

@ -892,7 +892,7 @@ class GreasePencilMaterialsPanel:
if is_view3d and brush is not None:
gp_settings = brush.gpencil_settings
if gp_settings.use_material_pin is False:
if ob.active_material_index > 0:
if ob.active_material_index >= 0:
ma = ob.material_slots[ob.active_material_index].material
else:
ma = gp_settings.material