From 640d3fa39b647f9613ef47c812ad73cfa96ae0bc Mon Sep 17 00:00:00 2001 From: kreso-t Date: Fri, 7 Sep 2018 18:27:29 +0200 Subject: [PATCH] Path: Adaptive -fix --- src/Mod/Path/libarea/Adaptive.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/libarea/Adaptive.cpp b/src/Mod/Path/libarea/Adaptive.cpp index 5eb8bab0b9..d171bd7861 100644 --- a/src/Mod/Path/libarea/Adaptive.cpp +++ b/src/Mod/Path/libarea/Adaptive.cpp @@ -2107,8 +2107,10 @@ namespace AdaptivePath { clip.AddPaths(toolCoverPoly,PolyType::ptClip,true); clip.Execute(ClipType::ctUnion,cleared); CleanPolygons(cleared); - lastPoint.X = finCleaned.back().X; - lastPoint.Y = finCleaned.back().Y; + if(!finCleaned.empty()) { + lastPoint.X = finCleaned.back().X; + lastPoint.Y = finCleaned.back().Y; + } } else { cerr << "UNABLE TO ADD FINISHING PASS! Please try increasing accuracy." << endl; break;