diff --git a/docs/changes.txt b/docs/changes.txt index 8d5208f407..9d1f434676 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -94,6 +94,7 @@ Major new features in 2.8 release All (Unix): - Handle socket shutdown by the peer correctly in wxSocket (Tim Kosse) +- Fix bug in wxFileConfig when recreating a group (Steven Van Ingelgem) - Added wxString::char_str() and wchar_str() methods for forward compatiblity with wxWidgets 3 diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index c6168de7c4..3c59583b7e 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -1773,7 +1773,7 @@ bool wxFileConfigGroup::DeleteSubgroup(wxFileConfigGroup *pGroup) m_pLastGroup = NULL; for ( wxFileConfigLineList *pl = pLine->Prev(); - pl && pl != m_pLine && !m_pLastGroup; + pl && !m_pLastGroup; pl = pl->Prev() ) { // does this line belong to our subgroup? @@ -1787,6 +1787,9 @@ bool wxFileConfigGroup::DeleteSubgroup(wxFileConfigGroup *pGroup) break; } } + + if ( pl == m_pLine ) + break; } }