diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2014-12-15 14:32:48 -0500 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2014-12-15 14:32:48 -0500 |
commit | 3a8036413f22f32b4b25c019ef2835df25e6c175 (patch) | |
tree | eac6547e68d38d42a1cb42a7643a319bb21a1db4 | |
parent | 0c62cd06552597966adb99183eb5ca78901a6087 (diff) | |
download | qtlocation-mapboxgl-3a8036413f22f32b4b25c019ef2835df25e6c175.tar.gz |
fix CachingHTTPFileSource::clearLoop
-rw-r--r-- | src/mbgl/storage/caching_http_file_source.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mbgl/storage/caching_http_file_source.cpp b/src/mbgl/storage/caching_http_file_source.cpp index d676357f8d..ddd65118fb 100644 --- a/src/mbgl/storage/caching_http_file_source.cpp +++ b/src/mbgl/storage/caching_http_file_source.cpp @@ -17,6 +17,8 @@ CachingHTTPFileSource::~CachingHTTPFileSource() { } void CachingHTTPFileSource::setLoop(uv_loop_t* loop_) { + assert(!loop); + thread_id = std::this_thread::get_id(); store = !path.empty() ? util::ptr<SQLiteStore>(new SQLiteStore(loop_, path)) : nullptr; loop = loop_; @@ -51,6 +53,8 @@ void CachingHTTPFileSource::clearLoop() { } store.reset(); + + loop = nullptr; } void CachingHTTPFileSource::setBase(std::string value) { |