diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-17 14:43:57 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-17 14:43:57 +0400 |
commit | e35d3083ecce72ad01fa63977355beb0c7a5ff68 (patch) | |
tree | ca35d0936362f409da7c1d8ab7f964760d4457dc /source/blender/blenkernel | |
parent | 29bc3d70246b6686cd7c9df5a2b6ab9d8e42c3b3 (diff) |
Fixed crash when rasterizing spline with only one point
It was an issue in new feather self-intersection test code.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/mask.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index 4b2f4947a71..64902f0ee3e 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -509,6 +509,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); |