summaryrefslogtreecommitdiff
path: root/lib/mime.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mime.c')
-rw-r--r--lib/mime.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mime.c b/lib/mime.c
index 89819a935..ce56d7873 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -1193,7 +1193,10 @@ CURLcode Curl_mime_duppart(curl_mimepart *dst, const curl_mimepart *src)
}
/* Duplicate other fields. */
- dst->encoder = src->encoder;
+ if(dst != NULL)
+ dst->encoder = src->encoder;
+ else
+ res = CURLE_WRITE_ERROR;
if(!res)
res = curl_mime_type(dst, src->mimetype);
if(!res)