diff options
Diffstat (limited to 'src/mbgl/style/sources/geojson_source_impl.cpp')
-rw-r--r-- | src/mbgl/style/sources/geojson_source_impl.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mbgl/style/sources/geojson_source_impl.cpp b/src/mbgl/style/sources/geojson_source_impl.cpp index 5ceb4f71e0..b050e5482e 100644 --- a/src/mbgl/style/sources/geojson_source_impl.cpp +++ b/src/mbgl/style/sources/geojson_source_impl.cpp @@ -153,9 +153,11 @@ void GeoJSONSource::Impl::loadDescription(FileSource& fileSource) { }); } -Range<uint8_t> GeoJSONSource::Impl::getZoomRange() const { - assert(loaded); - return { 0, options.maxzoom }; +optional<Range<uint8_t>> GeoJSONSource::Impl::getZoomRange() const { + if (loaded) { + return { { 0, options.maxzoom }}; + } + return {}; } std::unique_ptr<Tile> GeoJSONSource::Impl::createTile(const OverscaledTileID& tileID, |