Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-01-03 20:10:39 +0300
committerAntonioya <blendergit@gmail.com>2019-01-03 20:12:25 +0300
commita30bdcc142f1241a302107c637fd47be06073d76 (patch)
treefb35779851e20dc36984d8d41139298e65b720c4 /source/blender/editors/gpencil/gpencil_add_monkey.c
parent4b2198a96ac368fa5f2a353c7c148e015246cccf (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_monkey.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_add_monkey.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_add_monkey.c b/source/blender/editors/gpencil/gpencil_add_monkey.c
index ce5d765ada4..21697995b9c 100644
--- a/source/blender/editors/gpencil/gpencil_add_monkey.c
+++ b/source/blender/editors/gpencil/gpencil_add_monkey.c
@@ -535,10 +535,9 @@ static const ColorTemplate gp_monkey_pct_pupils = {
/* Monkey API */
/* add a 2D Suzanne (original model created by Matias Mendiola) */
-void ED_gpencil_create_monkey(bContext *C, float mat[4][4])
+void ED_gpencil_create_monkey(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;