Fix T41981: Crash by Copy mask splines without splines

This commit is contained in:
Sergey Sharybin 2014-09-28 14:37:33 +06:00
parent eaaa8934ae
commit 0546012669
Notes: blender-bot 2023-02-14 11:08:33 +01:00
Referenced by issue #41981, [Masking] Crash by Copy splines without splines
1 changed files with 4 additions and 0 deletions

View File

@ -2294,6 +2294,10 @@ static int copy_splines_exec(bContext *C, wmOperator *UNUSED(op))
Mask *mask = CTX_data_edit_mask(C);
MaskLayer *mask_layer = BKE_mask_layer_active(mask);
if (mask_layer == NULL) {
return OPERATOR_CANCELLED;
}
BKE_mask_clipboard_copy_from_layer(mask_layer);
return OPERATOR_FINISHED;