diff --git a/src/core/curl_get.cc b/src/core/curl_get.cc index f0767b79..8fb4709d 100644 --- a/src/core/curl_get.cc +++ b/src/core/curl_get.cc @@ -69,6 +69,9 @@ CurlGet::start() { m_handle = curl_easy_init(); + if (m_handle == NULL) + throw torrent::internal_error("Call to curl_easy_init() failed."); + curl_easy_setopt(m_handle, CURLOPT_URL, m_url.c_str()); curl_easy_setopt(m_handle, CURLOPT_WRITEFUNCTION, &curl_get_receive_write); curl_easy_setopt(m_handle, CURLOPT_WRITEDATA, this);