diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 87d34a7e43..f537c0b9f3 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -672,7 +672,7 @@ static bool init_resolve_thread(struct Curl_easy *data, td->thread_hnd = Curl_thread_create(gethostbyname_thread, &td->tsd); #endif - if(!td->thread_hnd) { + if(td->thread_hnd == curl_thread_t_null) { /* The thread never started, so mark it as done here for proper cleanup. */ td->tsd.done = 1; err = errno;