X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2dd8380badebac8dc01f8948288235ae91056ed..5b6ec9803a058368a1b240a22d444c7301c5715a:/src/gtk1/threadno.cpp diff --git a/src/gtk1/threadno.cpp b/src/gtk1/threadno.cpp index 3a1f3460c7..375d2ac6a7 100644 --- a/src/gtk1/threadno.cpp +++ b/src/gtk1/threadno.cpp @@ -138,7 +138,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 +168,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)