From: Kaj-Michael Lang Date: Wed, 7 May 2008 20:20:12 +0000 (+0300) Subject: Map download: X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f459a81abf9e88061118817a79a0eb4eeaa3f2de;p=mapper Map download: - Check file descriptor is ok before closing just in case --- diff --git a/src/map-download.c b/src/map-download.c index 5311ac4..bd36aa3 100644 --- a/src/map-download.c +++ b/src/map-download.c @@ -518,7 +518,8 @@ if (_curl_multi) { ProgressUpdateInfo *pui = g_hash_table_lookup(pui_by_easy, msg->easy_handle); g_queue_push_head(curl_easy_queue, msg->easy_handle); g_hash_table_remove(pui_by_easy, msg->easy_handle); - fclose(pui->file); + if (pui->file) + fclose(pui->file); curl_multi_remove_handle(_curl_multi, msg->easy_handle); } }