]> granicus.if.org Git - curl/commitdiff
mime: do not call failf() if easy handle is NULL.
authorPatrick Monnerat <patrick@monnerat.net>
Fri, 13 Oct 2017 16:16:57 +0000 (17:16 +0100)
committerPatrick Monnerat <patrick@monnerat.net>
Fri, 13 Oct 2017 16:16:57 +0000 (17:16 +0100)
lib/mime.c

index c337a35c9bf80c5e32a3f3c369e0a10df58473ee..c3c3708914b152b23320155b0365dc346972f8a3 100644 (file)
@@ -1437,7 +1437,8 @@ CURLcode Curl_mime_set_subparts(curl_mimepart *part,
       while(root->parent && root->parent->parent)
         root = root->parent->parent;
       if(subparts == root) {
-        failf(part->easy, "Can't add itself as a subpart!");
+        if(part->easy)
+          failf(part->easy, "Can't add itself as a subpart!");
         return CURLE_BAD_FUNCTION_ARGUMENT;
       }
     }