diff options
author | Antonioya <blendergit@gmail.com> | 2018-11-23 19:34:27 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-11-23 19:34:53 +0300 |
commit | be940fcd5f0f180a4700020ae2c24d46152c0801 (patch) | |
tree | 3e0bc66e291d1f0694c1301353a2fa6561c088ad | |
parent | b05adc1f9716dab0c673ba60ce5ef4a5558731e1 (diff) |
GP: Avoid crash when adding new layer
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |