summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/util/tile_cover_impl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mbgl/util/tile_cover_impl.cpp b/src/mbgl/util/tile_cover_impl.cpp
index f796cc7bd3..799ff2666a 100644
--- a/src/mbgl/util/tile_cover_impl.cpp
+++ b/src/mbgl/util/tile_cover_impl.cpp
@@ -32,6 +32,8 @@ void start_list_on_local_minimum(PointList& points) {
next_pt++;
if (next_pt == points.end()) { next_pt = std::next(points.begin()); }
}
+ if (pt == points.end())
+ return;
//Re-close linear rings with first_pt = last_pt
if (points.back() == points.front()) {
points.pop_back();