summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-08-25 17:44:44 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-08-26 10:30:55 -0700
commitd2abb1b6d5cc129acaadab15152ae286b989d9ba (patch)
tree05528dfb620931cda49b044c2d8fbbcc4da67232 /platform/default
parent50ae6c738a3ed1da14c73ce507071385bbc441b0 (diff)
downloadqtlocation-mapboxgl-d2abb1b6d5cc129acaadab15152ae286b989d9ba.tar.gz
[core] Change GeoJSONSource::getURL() to return an optional<std::string>
GeoJSON sources may have inline GeoJSON rather than a URL; returning an optional type ensures that consumers handle this case.
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/mbgl/storage/offline_download.cpp4
1 files changed, 2 insertions, 2 deletions
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<style::GeoJSONSource::Impl*>(source->baseImpl.get());
- if (!geojsonSource->loaded) {
- ensureResource(Resource::source(geojsonSource->getURL()));
+ if (geojsonSource->getURL()) {
+ ensureResource(Resource::source(*geojsonSource->getURL()));
}
break;
}