summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-07-13 16:31:47 +0200
committerKonstantin Käfer <mail@kkaefer.com>2017-07-13 17:54:18 +0200
commit86682f2507a9ce4b3101a8287f5e7e1bf53d0ca1 (patch)
treed3db5f042f68f4551aafd34bd6de7dc4007335b4 /platform/default
parent06e202441e9ba5bfc87a5be7c7e157fff61a6264 (diff)
downloadqtlocation-mapboxgl-86682f2507a9ce4b3101a8287f5e7e1bf53d0ca1.tar.gz
[core] fix undefined access for HTTP responses that don't contain a body
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/mbgl/storage/offline_database.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/default/mbgl/storage/offline_database.cpp b/platform/default/mbgl/storage/offline_database.cpp
index 02736f10a4..bad4ccdbf1 100644
--- a/platform/default/mbgl/storage/offline_database.cpp
+++ b/platform/default/mbgl/storage/offline_database.cpp
@@ -188,11 +188,11 @@ std::pair<bool, uint64_t> OfflineDatabase::putInternal(const Resource& resource,
if (resource.kind == Resource::Kind::Tile) {
assert(resource.tileData);
inserted = putTile(*resource.tileData, response,
- compressed ? compressedData : *response.data,
+ compressed ? compressedData : response.data ? *response.data : "",
compressed);
} else {
inserted = putResource(resource, response,
- compressed ? compressedData : *response.data,
+ compressed ? compressedData : response.data ? *response.data : "",
compressed);
}