Explorar o código

Fix #2325 (#2331)

* Fix #2325

* clang-format
yhirose hai 2 semanas
pai
achega
0e1b52b23e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -4788,7 +4788,7 @@ inline int getaddrinfo_with_timeout(const char *node, const char *service,
 
   // Allocate on the heap, so the resolver thread can keep using the data.
   auto state = std::make_shared<GetAddrInfoState>();
-  state->node = node;
+  if (node) { state->node = node; }
   state->service = service;
   state->hints = *hints;