]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fileconf.cpp
Traditional Chinese translations update from Wei-Lun Chao.
[wxWidgets.git] / src / common / fileconf.cpp
index 75fcd7c88a0ccef4183ce8a3fb046d303eef7d1f..4b632703207d402ca81e7a81a9c48931aa394fc7 100644 (file)
@@ -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);