[Bf-blender-cvs] [0546012] blender-v2.72-release: Fix T41981: Crash by Copy mask splines without splines

Sergey Sharybin noreply at git.blender.org
Fri Oct 3 15:24:22 CEST 2014


Commit: 05460126696a76d45cecae43f55fba9b19ba1707
Author: Sergey Sharybin
Date:   Sun Sep 28 14:37:33 2014 +0600
Branches: blender-v2.72-release
https://developer.blender.org/rB05460126696a76d45cecae43f55fba9b19ba1707

Fix T41981: Crash by Copy mask splines without splines

===================================================================

M	source/blender/editors/mask/mask_ops.c

===================================================================

diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 2497095..16e1733 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -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;




More information about the Bf-blender-cvs mailing list