From 6da953ad1dbc1c0fb13ffb50ac896e9fcee3801b Mon Sep 17 00:00:00 2001 From: Antonioya Date: Mon, 6 May 2019 20:34:24 +0200 Subject: GPencil: Verify Brush has GPencil data This avoid errors in old files. --- source/blender/editors/gpencil/gpencil_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/gpencil/gpencil_utils.c') diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 129bd01574c..93a80f0fcf8 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -1387,7 +1387,7 @@ void ED_gpencil_add_defaults(bContext *C, Object *ob) 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) { + if ((paint->brush == NULL) || (paint->brush->gpencil_settings == NULL)) { /* create new brushes */ BKE_brush_gpencil_presets(C); } -- cgit v1.2.3