[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48657] trunk/blender/intern/raskter/ raskter.c: fix for error in own recebt commit, broke mask feathering.

Campbell Barton ideasman42 at gmail.com
Thu Jul 5 20:02:28 CEST 2012


Revision: 48657
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48657
Author:   campbellbarton
Date:     2012-07-05 18:02:28 +0000 (Thu, 05 Jul 2012)
Log Message:
-----------
fix for error in own recebt commit, broke mask feathering. 

Modified Paths:
--------------
    trunk/blender/intern/raskter/raskter.c

Modified: trunk/blender/intern/raskter/raskter.c
===================================================================
--- trunk/blender/intern/raskter/raskter.c	2012-07-05 17:08:06 UTC (rev 48656)
+++ trunk/blender/intern/raskter/raskter.c	2012-07-05 18:02:28 UTC (rev 48657)
@@ -218,7 +218,7 @@
 	/* can happen with a zero area mask */
 	if (ctx->all_edges == NULL) {
 		free(edgbuf);
-		return(0);
+		return(1);
 	}
 
 	/*
@@ -492,7 +492,7 @@
 	 * If the number of verts specified to render as a polygon is less than 3,
 	 * return immediately. Obviously we cant render a poly with sides < 3. The
 	 * return for this we set to 1, simply so it can be distinguished from the
-	 * next place we could return, /home/guest/blender-svn/soc-2011-tomato/intern/raskter/raskter
+	 * next place we could return,
 	 * which is a failure to allocate memory.
 	 */
 	if (num_feather_verts < 3) {
@@ -510,18 +510,18 @@
 		return(0);
 	}
 
-	/* can happen with a zero area mask */
-	if (ctx->all_edges == NULL) {
-		free(edgbuf);
-		return(0);
-	}
-
 	/*
 	 * Do some preprocessing on all edges. This constructs a table structure in memory of all
 	 * the edge properties and can "flip" some edges so sorting works correctly.
 	 */
 	preprocess_all_edges(ctx, feather_verts, num_feather_verts, edgbuf);
 
+	/* can happen with a zero area mask */
+	if (ctx->all_edges == NULL) {
+		free(edgbuf);
+		return(1);
+	}
+
 	/*
 	 * Set the pointer for tracking the edges currently in processing to NULL to make sure
 	 * we don't get some crazy value after initialization.




More information about the Bf-blender-cvs mailing list