diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_2.cpp b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_2.cpp index cda244ce28d..3a9eaa530de 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_2.cpp +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/Segment_voronoi_2.cpp @@ -305,6 +305,7 @@ MainWindow::loadPolygonConstraints(QString fileName) std::ifstream ifs(qPrintable(fileName)); int n; while(ifs >> n){ + CGAL_assertion( n > 0 ); ifs >> first; p = first; vfirst = vp = svd.insert(p); @@ -316,7 +317,9 @@ MainWindow::loadPolygonConstraints(QString fileName) p = q; vp = vq; } - svd.insert(vp, vfirst); + if (vfirst != vp) { + svd.insert(vp, vfirst); + } }