]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sckaddr.cpp
Ensure that size in the major direction of box sizer doesn't exceed the total.
[wxWidgets.git] / src / common / sckaddr.cpp
index 9e21624fed06df1fd95b737a4949e0c62e286c9c..5f2797cf5cdf966900d74502c70edd6bf959db34 100644 (file)
@@ -31,6 +31,7 @@
     #include "wx/object.h"
     #include "wx/log.h"
     #include "wx/intl.h"
+    #include "wx/thread.h"
 
     #include <stdio.h>
     #include <stdlib.h>
@@ -734,7 +735,7 @@ int wxSockAddress::GetAddressDataLen() const
 
 void wxSockAddress::Init()
 {
-    if ( !wxSocketBase::IsInitialized() )
+    if ( wxIsMainThread() && !wxSocketBase::IsInitialized() )
     {
         // we must do it before using any socket functions
         (void)wxSocketBase::Initialize();