Fix order of checks to avoid calling back() on an empty vector

This commit is contained in:
Mael Rouxel-Labbé 2019-05-24 08:24:38 +02:00
parent 845002d7bf
commit 084cdc3797
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ namespace CGAL{ namespace internal {
typename std::vector<Point>::iterator last = std::unique(result.begin(),result.end());
result.erase(last,result.end());
while(result.back() == result.front() && result.size() > 1)
while(result.size() > 1 && result.back() == result.front())
result.pop_back();
switch(result.size()){