diff --git a/src/osm_store.cpp b/src/osm_store.cpp index 5bd6ef61..799044d1 100644 --- a/src/osm_store.cpp +++ b/src/osm_store.cpp @@ -13,7 +13,7 @@ using namespace std; namespace bg = boost::geometry; static inline bool isClosed(const std::vector& way) { - return way.begin() == way.end(); + return !way.empty() && way.front() == way.back(); } UsedObjects::UsedObjects(Status status): status(status), mutex(256), ids(256 * 1024) {