diff --git a/src/mbgl/map/vector_tile.cpp b/src/mbgl/map/vector_tile.cpp index 5914338b3..72142f0a0 100644 --- a/src/mbgl/map/vector_tile.cpp +++ b/src/mbgl/map/vector_tile.cpp @@ -206,7 +206,7 @@ util::ptr VectorTileLayer::createFilter(const FilterE } util::ptr VectorTileLayer::nextFeature() { - while (feature_pbf.next(2)) { + if (feature_pbf.next(2)) { return std::move(std::make_shared(feature_pbf.message(), shared_from_this())); }