X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4bb6408c2631988fab9925014c6619358bf867de..5de5db0eb14aa86b5b177050720deb0f4c210fba:/src/motif/thread.cpp diff --git a/src/motif/thread.cpp b/src/motif/thread.cpp index c197787003..ca3833153a 100644 --- a/src/motif/thread.cpp +++ b/src/motif/thread.cpp @@ -28,7 +28,7 @@ enum thread_state { // Static variables ///////////////////////////////////////////////////////////////////////////// -wxMutex wxMainMutex; // controls access to all GUI functions +wxMutex *wxMainMutex; // controls access to all GUI functions ///////////////////////////////////////////////////////////////////////////// // Windows implementation @@ -243,13 +243,15 @@ class wxThreadModule : public wxModule { public: virtual bool OnInit() { /* TODO p_mainid = GetCurrentThread(); */ - wxMainMutex.Lock(); + wxMainMutex = new wxMutex(); + wxMainMutex->Lock(); return TRUE; } // Global cleanup virtual void OnExit() { - wxMainMutex.Unlock(); + wxMainMutex->Unlock(); + delete wxMainMutex; } };