summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-12-18 16:30:32 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-12-18 17:19:15 +0200
commit28ccb0ccc08416b9e8ced25ae938a50ca4a00151 (patch)
treec7703e89c9793b69f1bd922188d02a2019729d8a /platform
parent205f0e2f72b0d6bb0a91c5d1addae5f0ef040782 (diff)
downloadqtlocation-mapboxgl-28ccb0ccc08416b9e8ced25ae938a50ca4a00151.tar.gz
[core] Offline download must clear batch buffer at load interrupt
Otherwise, the stale buffer data are processed again at the repeated load. It is causing various problems like missing load completion notification or crashes (if the previously used observer instance has been deleted).
Diffstat (limited to 'platform')
-rw-r--r--platform/default/src/mbgl/storage/offline_download.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/default/src/mbgl/storage/offline_download.cpp b/platform/default/src/mbgl/storage/offline_download.cpp
index d5cf7e4fe1..98eb1d3884 100644
--- a/platform/default/src/mbgl/storage/offline_download.cpp
+++ b/platform/default/src/mbgl/storage/offline_download.cpp
@@ -379,6 +379,7 @@ void OfflineDownload::deactivateDownload() {
requiredSourceURLs.clear();
resourcesRemaining.clear();
requests.clear();
+ buffer.clear();
}
void OfflineDownload::queueResource(Resource&& resource) {