GPencil: Avoid console warnings when no Sculpt brush selected

If the brush is deleted, the panel must not be filled.

To recreate the missing Brush is necessary to use `Reset All`

This fix part of T98904
This commit is contained in:
Antonio Vazquez
2022-06-15 13:30:14 +02:00
parent 2e6cd70473
commit 41053deba4

View File

@@ -1317,6 +1317,8 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False)
def brush_basic_gpencil_sculpt_settings(layout, _context, brush, *, compact=False):
gp_settings = brush.gpencil_settings
if gp_settings is None:
return
tool = brush.gpencil_sculpt_tool
row = layout.row(align=True)