From f459a81abf9e88061118817a79a0eb4eeaa3f2de Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 7 May 2008 23:20:12 +0300 Subject: [PATCH] Map download: - Check file descriptor is ok before closing just in case --- src/map-download.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } -- 2.39.5