[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48656] branches/soc-2011-tomato/source/ blender/blenkernel/intern/mask.c: fix for crash in point comparison when one of the arrays is NULL

Campbell Barton ideasman42 at gmail.com
Thu Jul 5 19:08:06 CEST 2012


Revision: 48656
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48656
Author:   campbellbarton
Date:     2012-07-05 17:08:06 +0000 (Thu, 05 Jul 2012)
Log Message:
-----------
fix for crash in point comparison when one of the arrays is NULL

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c	2012-07-05 16:41:19 UTC (rev 48655)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c	2012-07-05 17:08:06 UTC (rev 48656)
@@ -2215,6 +2215,11 @@
 	MaskSplinePoint *point_b = points_b;
 	int a = tot_point;
 
+	/* deform points can be NULL */
+	if (point_a == NULL || point_b == NULL) {
+		return ((point_a == NULL) && (point_b == NULL));
+	}
+
 	while (a--) {
 		if (!mask_point_compare(point_a, point_b)) {
 			return FALSE;




More information about the Bf-blender-cvs mailing list