}
qcurl_easy_setopt(di->curle, CURLOPT_HTTPHEADER, di->slist);
-
qcurl_multi_add_handle(curlm, di->curle);
di->started = true;
for(di = downloads; di; di = di->next)
{
double b = 0;
- qcurl_easy_getinfo(di->curle, CURLINFO_SIZE_UPLOAD, &b);
- bytes_sent += (b - di->bytes_sent_curl);
- di->bytes_sent_curl = b;
- qcurl_easy_getinfo(di->curle, CURLINFO_SIZE_DOWNLOAD, &b);
- bytes_sent += (b - di->bytes_received_curl);
- di->bytes_received_curl = b;
+ if(di->curle)
+ {
+ qcurl_easy_getinfo(di->curle, CURLINFO_SIZE_UPLOAD, &b);
+ bytes_sent += (b - di->bytes_sent_curl);
+ di->bytes_sent_curl = b;
+ qcurl_easy_getinfo(di->curle, CURLINFO_SIZE_DOWNLOAD, &b);
+ bytes_sent += (b - di->bytes_received_curl);
+ di->bytes_received_curl = b;
+ }
}
for(;;)