]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/threadpsx.cpp
//... => /* ... */
[wxWidgets.git] / src / unix / threadpsx.cpp
index 75b3bff75778af1046ad249e378c425ca393443a..c3a6ff6268926000bc4c4a1a76dd366e4ab6010a 100644 (file)
@@ -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