X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2dd8380badebac8dc01f8948288235ae91056ed..50c319beec2454b4f669b6c8cf3d089f53c979f6:/src/gtk1/threadno.cpp?ds=inline diff --git a/src/gtk1/threadno.cpp b/src/gtk1/threadno.cpp index 3a1f3460c7..ee844fbf0f 100644 --- a/src/gtk1/threadno.cpp +++ b/src/gtk1/threadno.cpp @@ -15,6 +15,7 @@ #include "wx/wx.h" #include "wx/module.h" #include "wx/thread.h" +#include "wx/log.h" wxMutex::wxMutex() { @@ -24,7 +25,7 @@ wxMutex::wxMutex() wxMutex::~wxMutex() { if (m_locked) - wxDebugMsg("wxMutex warning: destroying a locked mutex (%d locks)\n", m_locked); + wxLogDebug( "wxMutex warning: destroying a locked mutex (%d locks)\n", m_locked ); } wxMutexError wxMutex::Lock() @@ -138,7 +139,7 @@ bool wxThread::IsAlive() const void wxThread::SetPriority(int WXUNUSED(prio)) { } int wxThread::GetPriority() const { return 0; } -wxMutex wxMainMutex; // controls access to all GUI functions +wxMutex *wxMainMutex; // controls access to all GUI functions wxThread::wxThread() { @@ -168,13 +169,15 @@ public: }; bool wxThreadModule::OnInit() { - wxMainMutex.Lock(); + wxMainMutex = new wxMutex(); + wxMainMutex->Lock(); return TRUE; } void wxThreadModule::OnExit() { - wxMainMutex.Unlock(); + wxMainMutex->Unlock(); + delete wxMainMutex; } IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)