[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47281] branches/soc-2011-tomato/source/ blender/blenkernel/intern/mask.c: Fix possible memory leak where spline differentiation fails but feather differentiation does not .

Peter Larabell xgl.asyliax at gmail.com
Thu May 31 16:36:23 CEST 2012


Revision: 47281
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47281
Author:   xglasyliax
Date:     2012-05-31 14:36:22 +0000 (Thu, 31 May 2012)
Log Message:
-----------
Fix possible memory leak where spline differentiation fails but feather differentiation does not.

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-05-31 14:29:09 UTC (rev 47280)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c	2012-05-31 14:36:22 UTC (rev 47281)
@@ -1790,7 +1790,9 @@
 			int tot_diff_feather_points;
 
 			diff_points = BKE_mask_spline_differentiate(spline, &tot_diff_point);
-			diff_feather_points = BKE_mask_spline_feather_differentiated_points(spline, &tot_diff_feather_points);
+			if(tot_diff_point){
+				diff_feather_points = BKE_mask_spline_feather_differentiated_points(spline, &tot_diff_feather_points);
+			}
 
 			/* TODO, make this optional! */
 			if (width != height) {




More information about the Bf-blender-cvs mailing list