diff options
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_merge.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 463c2144276..9ef0657ae83 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -314,7 +314,7 @@ static int gpencil_paintmode_toggle_exec(bContext *C, wmOperator *op) 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)) { BKE_brush_gpencil_presets(C); } BKE_paint_toolslots_brush_validate(bmain, &ts->gp_paint->paint); diff --git a/source/blender/editors/gpencil/gpencil_merge.c b/source/blender/editors/gpencil/gpencil_merge.c index 9d3c2a6e271..93d8555e014 100644 --- a/source/blender/editors/gpencil/gpencil_merge.c +++ b/source/blender/editors/gpencil/gpencil_merge.c @@ -110,7 +110,7 @@ static bGPDstroke *gpencil_prepare_stroke(bContext *C, wmOperator *op, int totpo 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); } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index b1b29356060..cd1ebc91fbb 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1819,7 +1819,7 @@ static void gp_init_drawing_brush(bContext *C, tGPsdata *p) Paint *paint = &ts->gp_paint->paint; bool changed = false; /* 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); changed = true; diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 08fee2bb393..bff17bf5078 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -314,7 +314,7 @@ static void gp_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi) /* if brush doesn't exist, create a new one */ 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); } 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); } |