]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fileconf.cpp
Fix wxGenericListCtrl best size calculation in report view.
[wxWidgets.git] / src / common / fileconf.cpp
index ee79bdba34b33d05673f4a59a06662b314cb0157..4b632703207d402ca81e7a81a9c48931aa394fc7 100644 (file)
@@ -46,7 +46,7 @@
 
 #include  "wx/stdpaths.h"
 
-#if defined(__WXMSW__)
+#if defined(__WINDOWS__)
     #include "wx/msw/private.h"
 #endif  //windows.h
 #if defined(__WXPM__)
@@ -1818,6 +1818,11 @@ bool wxFileConfigGroup::DeleteEntry(const wxString& name)
       // pNewLast can be NULL here -- it's ok and can happen if we have no
       // entries left
       m_pLastEntry = pNewLast;
+
+      // For the root group only, we could be removing the first group line
+      // here, so update m_pLine to avoid keeping a dangling pointer.
+      if ( pLine == m_pLine )
+          SetLine(NULL);
     }
 
     m_pConfig->LineListRemove(pLine);