Merging r48992 through r48995 from trunk into soc-2011-tomato
[blender.git] / source / blender / blenkernel / intern / mask.c
index c92a811243206e8edc7598993b1a4c64ec4221b9..d345ba581720bf4763b210f43e2d9f390e580071 100644 (file)
@@ -524,6 +524,14 @@ static void spline_feather_collapse_inner_loops(float (*feather_points)[2], int
        int i;
        float min[2], max[2];
 
+       if (tot_feather_point < 4) {
+               /* self-intersection works only for quads at least,
+                * in other cases polygon can't be self-intersecting anyway
+                */
+
+               return;
+       }
+
        /* find min/max corners of mask to build buckets in that space */
        INIT_MINMAX2(min, max);