X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f439844be27aa4ec09dd1d3365ce44653291c2af..f35c265988485487c24c341fd270bd3faac4f6eb:/src/unix/threadpsx.cpp diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 75b3bff757..c3a6ff6268 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -100,12 +100,9 @@ public: wxMutex::wxMutex() { - pthread_mutexattr_t attr_type; - - pthread_mutexattr_settype( &attr_type, PTHREAD_MUTEX_FAST_NP ); - p_internal = new wxMutexInternal; - pthread_mutex_init( &(p_internal->p_mutex), (const pthread_mutexattr_t*) &attr_type ); + + pthread_mutex_init( &(p_internal->p_mutex), (const pthread_mutexattr_t*) NULL ); m_locked = 0; } @@ -861,7 +858,9 @@ void wxThreadModule::OnExit() for ( size_t n = 0u; n < count; n++ ) { - gs_allThreads[n]->Delete(); + // Delete calls the destructor which removes the current entry. We + // should only delete the first one each time. + gs_allThreads[0]->Delete(); } // destroy GUI mutex