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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-09-26 12:37:30 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-09-26 12:37:30 +0400
commitdcc281b74a7108f9bd65145cb691fc66c72e441d (patch)
treee23c1ae6a9313e457388fcfd79e6dd6f4f470602 /source/blender/editors/mask/mask_ops.c
parent58a9569628c96ecf471c2ad42a73ae8ff6cd398c (diff)
Fix T41961: Crash by Copy n Paste splines to new mask without layer
It makes much more sense to ensure layer before pasteing, makes roto as easy as it has never been before!
Diffstat (limited to 'source/blender/editors/mask/mask_ops.c')
-rw-r--r--source/blender/editors/mask/mask_ops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 9f8388f1fe0..2497095aca6 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -2331,6 +2331,10 @@ static int paste_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) {
+ mask_layer = BKE_mask_layer_new(mask, "");
+ }
+
BKE_mask_clipboard_paste_to_layer(CTX_data_main(C), mask_layer);
/* TODO: only update edited splines */