mime: do not call failf() if easy handle is NULL.

This commit is contained in:
Patrick Monnerat 2017-10-13 17:16:57 +01:00
parent 10a659dbf6
commit d7e4230538
1 changed files with 2 additions and 1 deletions

View 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;
}
}