]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sckaddr.cpp
controls can now be put in the toolbars (MSW only so far, preliminary version)
[wxWidgets.git] / src / common / sckaddr.cpp
index 1e126d81afc988d951dd6d5855648791295f187e..398a3cf016bc8ca893a8ab4d6509aeabf3a4f4bf 100644 (file)
 #include <memory.h>
 #endif
 
-#include <wx/defs.h>
-#include <wx/object.h>
-#include <wx/gsocket.h>
-#include <wx/sckaddr.h>
+#include "wx/defs.h"
+#include "wx/object.h"
+#include "wx/log.h"
+#include "wx/gsocket.h"
+#include "wx/sckaddr.h"
 
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_ABSTRACT_CLASS(wxSockAddress, wxObject)
@@ -101,6 +102,12 @@ wxIPV4address::~wxIPV4address()
 
 bool wxIPV4address::Hostname(const wxString& name)
 {
+  // Some people are sometimes fool.
+  if (name == wxT("")) {
+    wxLogWarning( wxT("Trying to solve a NULL hostname: giving up") );
+    return FALSE;
+  }
+
   return (GAddress_INET_SetHostName(m_address, name.fn_str()) == GSOCK_NOERROR);
 }