summaryrefslogtreecommitdiff
path: root/lib/setopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/setopt.c')
-rw-r--r--lib/setopt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/setopt.c b/lib/setopt.c
index 731ffeb36..409234fcd 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -2169,8 +2169,9 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
data->share = NULL;
}
- /* use new share if it set */
- data->share = set;
+ if(GOOD_SHARE_HANDLE(set))
+ /* use new share if it set */
+ data->share = set;
if(data->share) {
Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE);