mirror of https://github.com/CGAL/cgal
Fix order of checks to avoid calling back() on an empty vector
This commit is contained in:
parent
845002d7bf
commit
084cdc3797
|
|
@ -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()){
|
||||
|
|
|
|||
Loading…
Reference in New Issue