From 28bce241fde51391b8f7be286962afd0b86a1edf Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 9 Apr 2009 21:36:09 +0000 Subject: (svn r16005) -Fix: assertion when there is no last joined server; when you've got an unresolved address, the hostname cannot be resolved either so return it as-is. --- src/network/core/address.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp index 159c9cf11..541b4673b 100644 --- a/src/network/core/address.cpp +++ b/src/network/core/address.cpp @@ -14,7 +14,7 @@ const char *NetworkAddress::GetHostname() { - if (StrEmpty(this->hostname)) { + if (StrEmpty(this->hostname) && this->address.ss_family != AF_UNSPEC) { assert(this->address_length != 0); getnameinfo((struct sockaddr *)&this->address, this->address_length, this->hostname, sizeof(this->hostname), NULL, 0, NI_NUMERICHOST); } -- cgit v1.2.3-70-g09d2