diff options
Diffstat (limited to '')
-rw-r--r-- | src/httpfetch.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp index 6137782ff..1307bfec3 100644 --- a/src/httpfetch.cpp +++ b/src/httpfetch.cpp @@ -761,10 +761,12 @@ void httpfetch_cleanup() { verbosestream<<"httpfetch_cleanup: cleaning up"<<std::endl; - g_httpfetch_thread->stop(); - g_httpfetch_thread->requestWakeUp(); - g_httpfetch_thread->wait(); - delete g_httpfetch_thread; + if (g_httpfetch_thread) { + g_httpfetch_thread->stop(); + g_httpfetch_thread->requestWakeUp(); + g_httpfetch_thread->wait(); + delete g_httpfetch_thread; + } curl_global_cleanup(); } |