[Bf-blender-cvs] [4134bdc] master: Fix for rare crash in recent mask option to check overlaps

Campbell Barton noreply at git.blender.org
Mon Feb 17 05:16:37 CET 2014


Commit: 4134bdc75c8f7fe354d850e84503546d743e9382
Author: Campbell Barton
Date:   Mon Feb 17 15:15:49 2014 +1100
https://developer.blender.org/rB4134bdc75c8f7fe354d850e84503546d743e9382

Fix for rare crash in recent mask option to check overlaps

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

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 a6477d4..afa40c0 100644
--- a/source/blender/blenlib/intern/scanfill_utils.c
+++ b/source/blender/blenlib/intern/scanfill_utils.c
@@ -258,6 +258,12 @@ static bool scanfill_preprocess_self_isect(
 
 				LinkData *isect_link;
 
+				if (UNLIKELY(e_ls == NULL)) {
+					/* only happens in very rare cases (entirely overlapping splines).
+					 * in this case se can't do much useful. but at least don't crash */
+					continue;
+				}
+
 				/* maintain coorect terminating edge */
 				if (pi->edge_last == eed) {
 					pi->edge_last = NULL;




More information about the Bf-blender-cvs mailing list