[Bf-blender-cvs] [05235d8] master: Fix for issue in mask overlap with no splines in the mask.

Campbell Barton noreply at git.blender.org
Mon Feb 17 08:56:45 CET 2014


Commit: 05235d86eff257246ca2068f3acd3fdce0b944a2
Author: Campbell Barton
Date:   Mon Feb 17 18:54:24 2014 +1100
https://developer.blender.org/rB05235d86eff257246ca2068f3acd3fdce0b944a2

Fix for issue in mask overlap with no splines in the mask.

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

M	source/blender/blenlib/intern/scanfill_utils.c

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

diff --git a/source/blender/blenlib/intern/scanfill_utils.c b/source/blender/blenlib/intern/scanfill_utils.c
index afa40c0..2e6abd9 100644
--- a/source/blender/blenlib/intern/scanfill_utils.c
+++ b/source/blender/blenlib/intern/scanfill_utils.c
@@ -410,7 +410,13 @@ bool BLI_scanfill_calc_self_isect(
 	int totvert_new = 0;
 	bool changed = false;
 
-	PolyInfo *poly_info = MEM_callocN(sizeof(*poly_info) * poly_tot, __func__);
+	PolyInfo *poly_info;
+
+	if (UNLIKELY(sf_ctx->poly_nr == SF_POLY_UNSET)) {
+		return false;
+	}
+
+	poly_info = MEM_callocN(sizeof(*poly_info) * poly_tot, __func__);
 
 	/* get the polygon span */
 	if (sf_ctx->poly_nr == 0) {




More information about the Bf-blender-cvs mailing list