From d7e4230538b57c399937e513e05cab60073b6780 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Fri, 13 Oct 2017 17:16:57 +0100 Subject: [PATCH] mime: do not call failf() if easy handle is NULL. --- lib/mime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mime.c b/lib/mime.c index c337a35c9..c3c370891 100644 --- a/lib/mime.c +++ b/lib/mime.c @@ -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; } }