X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f877815e1b36c9b059b0d1025db4df4845e2a57d..dad6a47e6d425673510b53e9a01114cdea2a5f2c:/src/os2/thread.cpp diff --git a/src/os2/thread.cpp b/src/os2/thread.cpp index c20cdf3b1f..c837f5c1a7 100644 --- a/src/os2/thread.cpp +++ b/src/os2/thread.cpp @@ -26,6 +26,7 @@ #include #include "wx/app.h" +#include "wx/apptrait.h" #include "wx/module.h" #include "wx/intl.h" #include "wx/utils.h" @@ -409,7 +410,13 @@ void wxThreadInternal::OS2ThreadStart( } else // do run thread { + wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + unsigned long ulHab; + if (traits) + traits->InitializeGui(ulHab); dwRet = (DWORD)pThread->Entry(); + if (traits) + traits->TerminateGui(ulHab); // enter m_critsect before changing the thread state pThread->m_critsect.Enter();