]> err.no Git - mapper/commitdiff
Map download:
authorKaj-Michael Lang <milang@tal.org>
Wed, 7 May 2008 20:20:12 +0000 (23:20 +0300)
committerKaj-Michael Lang <milang@tal.org>
Wed, 7 May 2008 20:20:12 +0000 (23:20 +0300)
- Check file descriptor is ok before closing just in case

src/map-download.c

index 5311ac423775693d676db78679dd4562902c7cfb..bd36aa3eee40bf8e1d35f06da889d2290b9d5688 100644 (file)
@@ -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);
                }
        }