[Bf-blender-cvs] [be940fcd5f0] blender2.8: GP: Avoid crash when adding new layer
Antonioya
noreply at git.blender.org
Fri Nov 23 17:34:59 CET 2018
Commit: be940fcd5f0f180a4700020ae2c24d46152c0801
Author: Antonioya
Date: Fri Nov 23 17:34:27 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBbe940fcd5f0f180a4700020ae2c24d46152c0801
GP: Avoid crash when adding new layer
===================================================================
M source/blender/editors/gpencil/gpencil_data.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index b7568ce20dd..e9b65009781 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -258,6 +258,8 @@ static int gp_layer_add_exec(bContext *C, wmOperator *op)
}
/* notifiers */
+ bGPdata *gpd = *gpd_ptr;
+ DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA | DEG_TAG_COPY_ON_WRITE);
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
return OPERATOR_FINISHED;
More information about the Bf-blender-cvs
mailing list