X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed4c6c69a9ffdbb975e954fd86aea2893ce490a5..0c8392cac2d36d0d211432e71d3b24d3d93c22db:/src/common/socket.cpp diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 96f06d81b2..5816414509 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -41,6 +41,10 @@ #include "wx/sckaddr.h" #include "wx/socket.h" +// DLL options compatibility check: +#include "wx/build.h" +WX_CHECK_BUILD_OPTIONS("wxNet") + // -------------------------------------------------------------------------- // macros and constants // -------------------------------------------------------------------------- @@ -122,6 +126,12 @@ bool wxSocketBase::Initialize() { if ( !m_countInit++ ) { + wxAppTraits *traits = wxAppConsole::GetInstance() ? + wxAppConsole::GetInstance()->GetTraits() : NULL; + GSocketGUIFunctionsTable *functions = + traits ? traits->GetSocketGUIFunctionsTable() : NULL; + GSocket_SetGUIFunctions(functions); + if ( !GSocket_Init() ) { m_countInit--; @@ -828,7 +838,7 @@ void wxSocketBase::SaveState() void wxSocketBase::RestoreState() { - wxNode *node; + wxList::compatibility_iterator node; wxSocketState *state; node = m_states.GetLast(); @@ -846,7 +856,7 @@ void wxSocketBase::RestoreState() m_cdata = state->m_cdata; #endif // WXWIN_COMPATIBILITY - delete node; + m_states.Erase(node); delete state; }