diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-05 22:02:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-05 22:02:28 +0400 |
commit | d8b86fd9b2365b070df9c0de0d3dc14b62d91a63 (patch) | |
tree | cb89a7d6c8af6cd04ae48d90ea1d8ecf6db76846 /intern | |
parent | b0598a203cc9ade116e7f10348bf352cf9fa7ff7 (diff) |
fix for error in own recebt commit, broke mask feathering.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/raskter/raskter.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/intern/raskter/raskter.c b/intern/raskter/raskter.c index 0eaff70709c..b405fde82e8 100644 --- a/intern/raskter/raskter.c +++ b/intern/raskter/raskter.c @@ -218,7 +218,7 @@ static int rast_scan_fill(struct r_fill_context *ctx, struct poly_vert *verts, i /* can happen with a zero area mask */ if (ctx->all_edges == NULL) { free(edgbuf); - return(0); + return(1); } /* @@ -492,7 +492,7 @@ static int rast_scan_feather(struct r_fill_context *ctx, * 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 @@ static int rast_scan_feather(struct r_fill_context *ctx, 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. |