summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-11-06 13:21:46 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-11-06 13:21:46 +0100
commit01d4cdbb02775df9dca92c98d96abd3c107b7713 (patch)
treef11f3f131319527e3c930a7e4c692aecc57b53da /platform
parent0480c10f900065c40c3f06616310daba168b6dcc (diff)
downloadqtlocation-mapboxgl-01d4cdbb02775df9dca92c98d96abd3c107b7713.tar.gz
clean up poll handle data in close() function so that assert() won't fail
Diffstat (limited to 'platform')
-rw-r--r--platform/default/http_request_baton_curl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/default/http_request_baton_curl.cpp b/platform/default/http_request_baton_curl.cpp
index ecde8618fd..b8b4bac5fd 100644
--- a/platform/default/http_request_baton_curl.cpp
+++ b/platform/default/http_request_baton_curl.cpp
@@ -134,6 +134,8 @@ public:
}
void stop() {
+ assert(poll_handle.data);
+ poll_handle.data = nullptr;
uv_poll_stop(&poll_handle);
uv_close((uv_handle_t *)&poll_handle, [](uv_handle_t *handle) {
delete (Socket *)handle->data;
@@ -141,7 +143,7 @@ public:
}
private:
- // Make the destructor private to ensure that ew can only close the Socket
+ // Make the destructor private to ensure that we can only close the Socket
// with stop(), and disallow manual deletion.
~Socket() {
assert(!poll_handle.data);