diff options
author | Campbell Barton <campbell@blender.org> | 2022-08-28 13:19:02 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-28 13:19:02 +0300 |
commit | 4694d497b7d2d4cf48ec22f59c1576969c8d5389 (patch) | |
tree | e4def79cdd639cd7342cbb79fa4992c67c72e125 | |
parent | ff78f79abce75c2b35ac746f31c334a5bf69d883 (diff) | |
parent | 219d1095756fda2e54b6168eb65c93e3869722a6 (diff) |
Merge branch 'blender-v3.3-release'
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index b7ac73b9692..340288b2d74 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -2076,6 +2076,9 @@ static void gpencil_brush_delete_mode_brushes(Main *bmain, } BKE_brush_delete(bmain, brush); + if (brush == brush_active) { + brush_active = NULL; + } } } @@ -2109,8 +2112,8 @@ static int gpencil_brush_reset_all_exec(bContext *C, wmOperator *UNUSED(op)) char tool = '0'; if (paint) { - Brush *brush_active = paint->brush; - if (brush_active) { + if (paint->brush) { + Brush *brush_active = paint->brush; switch (mode) { case CTX_MODE_PAINT_GPENCIL: { tool = brush_active->gpencil_tool; |