]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/threadpsx.cpp
Latest OS/2 compiler bug fixes for common and generic
[wxWidgets.git] / src / unix / threadpsx.cpp
index 130ea38598be8a051c46113a8221bd8a342f98fb..c3a6ff6268926000bc4c4a1a76dd366e4ab6010a 100644 (file)
@@ -858,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