X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a59be6d9737c850dcb4ab077e1a0e8462a6b690..86948c99a6f0fd177b09b3db0ef702739ec62a27:/src/common/sckipc.cpp diff --git a/src/common/sckipc.cpp b/src/common/sckipc.cpp index 9a9b4c62b8..9787f76858 100644 --- a/src/common/sckipc.cpp +++ b/src/common/sckipc.cpp @@ -163,15 +163,15 @@ wxConnectionBase *wxTCPClient::MakeConnection (const wxString& host, const wxString& serverName, const wxString& topic) { + wxSockAddress *addr = GetAddressFromName(serverName, host); + if ( !addr ) + return NULL; + wxSocketClient *client = new wxSocketClient(SCKIPC_FLAGS); wxSocketStream *stream = new wxSocketStream(*client); wxDataInputStream *data_is = new wxDataInputStream(*stream); wxDataOutputStream *data_os = new wxDataOutputStream(*stream); - wxSockAddress *addr = GetAddressFromName(serverName, host); - if ( !addr ) - return NULL; - bool ok = client->Connect(*addr); delete addr;