diff options
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 12dc3451902..fc50fa7359f 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -319,7 +319,8 @@ static int gpencil_paintmode_toggle_exec(bContext *C, wmOperator *op) if (mode == OB_MODE_GPENCIL_PAINT) { /* be sure we have brushes */ - Paint *paint = BKE_brush_get_gpencil_paint(ts); + BKE_paint_ensure(ts, (Paint **)&ts->gp_paint); + Paint *paint = &ts->gp_paint->paint; /* if not exist, create a new one */ if (paint->brush == NULL) { BKE_brush_gpencil_presets(C); |