diff options
author | Antonioya <blendergit@gmail.com> | 2019-01-03 20:10:39 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-01-03 20:12:25 +0300 |
commit | a30bdcc142f1241a302107c637fd47be06073d76 (patch) | |
tree | fb35779851e20dc36984d8d41139298e65b720c4 /source/blender/editors/gpencil/gpencil_add_stroke.c | |
parent | 4b2198a96ac368fa5f2a353c7c148e015246cccf (diff) |
Fix T60022: Crash when adding grease pencil object to a collection disabled in viewport.
See D4163
Thanks to Habib Gahbiche (@zazizizou) for the fix.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_add_stroke.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_add_stroke.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_add_stroke.c b/source/blender/editors/gpencil/gpencil_add_stroke.c index 330f7a69e09..6df3638d859 100644 --- a/source/blender/editors/gpencil/gpencil_add_stroke.c +++ b/source/blender/editors/gpencil/gpencil_add_stroke.c @@ -213,10 +213,9 @@ static const ColorTemplate gp_stroke_material_grey = { /* Stroke API */ /* add a Simple stroke with colors (original design created by Daniel M. Lara and Matias Mendiola) */ -void ED_gpencil_create_stroke(bContext *C, float mat[4][4]) +void ED_gpencil_create_stroke(bContext *C, Object *ob, float mat[4][4]) { Main *bmain = CTX_data_main(C); - Object *ob = CTX_data_active_object(C); Depsgraph *depsgraph = CTX_data_depsgraph(C); int cfra_eval = (int)DEG_get_ctime(depsgraph); bGPdata *gpd = (bGPdata *)ob->data; |