diff options
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 50dc1af5ca8..4268f0281e8 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1416,6 +1416,9 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op) /* Only created one layer and one material. */ strcpy(md->target_layer, ((bGPDlayer *)gpd->layers.first)->info); md->target_material = BKE_gpencil_material(ob, 1); + if (md->target_material) { + id_us_plus(&md->target_material->id); + } /* Stroke object is drawn in front of meshes by default. */ ob->dtx |= OB_DRAW_IN_FRONT; |