diff --git a/polygons.cpp b/polygons.cpp index 597dd35e..474a532f 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -242,6 +242,7 @@ void geometry_information::finishshape() { if(allminus || allplus) last->flags |= POLY_CCONVEX; allplus = true, allminus = true; + if(last->s == isize(hpc)) { last = NULL; return; } ld cx = hpc[last->s][0], cy = hpc[last->s][1]; for(int i=last->s; ie-1; i++) {