[Bf-blender-cvs] [2cca83c] master: Fix T41981: Crash by Copy mask splines without splines

Sergey Sharybin noreply at git.blender.org
Sun Sep 28 10:38:00 CEST 2014


Commit: 2cca83caf1e10dc8ee5f39486d46c60e10351006
Author: Sergey Sharybin
Date:   Sun Sep 28 14:37:33 2014 +0600
Branches: master
https://developer.blender.org/rB2cca83caf1e10dc8ee5f39486d46c60e10351006

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