- fix ftp download (ftp does not have a content type)
authorMichael Schroeder <mls@suse.de>
Wed, 4 Aug 2010 14:42:40 +0000 (16:42 +0200)
committerMichael Schroeder <mls@suse.de>
Thu, 5 Aug 2010 12:56:35 +0000 (14:56 +0200)
zypp/media/MediaMultiCurl.cc

index e105a2f..5a73f39 100644 (file)
@@ -1261,7 +1261,7 @@ void MediaMultiCurl::doGetFileCopy( const Pathname & filename , const Pathname &
     WAR << "Could not get the reponse code." << endl;
   }
   char *ptr = NULL;
-  if (curl_easy_getinfo(_curl, CURLINFO_CONTENT_TYPE, &ptr) == CURLE_OK)
+  if (curl_easy_getinfo(_curl, CURLINFO_CONTENT_TYPE, &ptr) == CURLE_OK && ptr)
     {
       string ct = string(ptr);
       if (ct.find("application/metalink+xml") == 0 || ct.find("application/metalink4+xml") == 0)