]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sckaddr.cpp
Added (untested) support for sub-locales.
[wxWidgets.git] / src / common / sckaddr.cpp
index 4c73c3c1e608a3eba2ed9c7e38a015642f45e1a0..e83aa78b2fb114c624ea98c2258f3cf10278b3c2 100644 (file)
@@ -195,7 +195,11 @@ wxString wxIPV4address::Hostname()
 
   h_ent = gethostbyaddr((char *)&(m_addr->sin_addr), sizeof(m_addr->sin_addr),
                        GetFamily());
-  return wxString(h_ent->h_name);
+                       
+  if (!h_ent)
+     return wxString("");
+  else
+     return wxString(h_ent->h_name);
 }
 
 unsigned short wxIPV4address::Service()