From d2abb1b6d5cc129acaadab15152ae286b989d9ba Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 25 Aug 2016 17:44:44 -0700 Subject: [core] Change GeoJSONSource::getURL() to return an optional GeoJSON sources may have inline GeoJSON rather than a URL; returning an optional type ensures that consumers handle this case. --- platform/default/mbgl/storage/offline_download.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'platform/default') diff --git a/platform/default/mbgl/storage/offline_download.cpp b/platform/default/mbgl/storage/offline_download.cpp index 87534f222f..bf75989d25 100644 --- a/platform/default/mbgl/storage/offline_download.cpp +++ b/platform/default/mbgl/storage/offline_download.cpp @@ -205,8 +205,8 @@ void OfflineDownload::activateDownload() { style::GeoJSONSource::Impl* geojsonSource = static_cast(source->baseImpl.get()); - if (!geojsonSource->loaded) { - ensureResource(Resource::source(geojsonSource->getURL())); + if (geojsonSource->getURL()) { + ensureResource(Resource::source(*geojsonSource->getURL())); } break; } -- cgit v1.2.1