# HG changeset patch # User rubidium # Date 2009-04-09 21:36:09 # Node ID 47f6e7f62646ac6bd7151aeeb666ef2d92a9bce7 # Parent b5d427e84625285a2a46b4223e9de5a37166d0de (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. diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp --- 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); }