tried to fix a race condition in the sample, not sure if I really did it though

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-06-20 22:25:01 +00:00
parent 35dcf13296
commit d1148d2418

View File

@ -563,10 +563,10 @@ void MyFrame::OnIdle(wxIdleEvent &event)
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
{ {
size_t count = wxGetApp().m_threads.Count(); const wxArrayThread& threads = wxGetApp().m_threads;
for ( size_t i = 0; i < count; i++ ) while ( !threads.IsEmpty() )
{ {
wxGetApp().m_threads[0]->Delete(); threads[0]->Delete();
} }
Close(TRUE); Close(TRUE);