diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-17 11:54:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-17 11:55:03 +0400 |
commit | 05235d86eff257246ca2068f3acd3fdce0b944a2 (patch) | |
tree | cfbe1b9c077df0803807e986e43651f5c2620e6c /source/blender/blenlib/intern/scanfill_utils.c | |
parent | f9b51f0635924e5a0263d206867cc4527db013dd (diff) |
Fix for issue in mask overlap with no splines in the mask.
Diffstat (limited to 'source/blender/blenlib/intern/scanfill_utils.c')
-rw-r--r-- | source/blender/blenlib/intern/scanfill_utils.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/scanfill_utils.c b/source/blender/blenlib/intern/scanfill_utils.c index afa40c0b3fe..2e6abd9cb4c 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) { |