]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/listbox.cpp
fix for bug reported by Robert and Julian, probably causes other problems
[wxWidgets.git] / src / mac / listbox.cpp
index 2d8471f00e9bb4ab7a72014bcc9356ced57698f3..2d9a8708d13acb0de831308f2c5c8072c7da1d6a 100644 (file)
@@ -265,6 +265,7 @@ void wxListBox::Free()
         size_t uiCount = m_aItems.Count();
         while ( uiCount-- != 0 ) {
             delete m_aItems[uiCount];
+            m_aItems[uiCount] = NULL;
         }
 
         m_aItems.Clear();
@@ -373,6 +374,7 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
         size_t ui = m_aItems.Count();
         while ( ui-- != 0 ) {
             delete m_aItems[ui];
+            m_aItems[ui] = NULL;
         }
         m_aItems.Empty();