From b66e7a06b559e868b355b099b53aac52f04b95bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karsten=20Ball=C3=BCder?= Date: Wed, 7 Apr 1999 11:23:50 +0000 Subject: [PATCH] I seem to have fixed the DeleteSubGroups() bug - PLEASE CHECK! git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/fileconf.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index cf8ad6879a..8c6ddeac2e 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -1106,11 +1106,18 @@ bool ConfigGroup::DeleteSubgroup(ConfigGroup *pGroup) } // and subgroups of this sungroup +#if 0 + // pGroup->m_aSubgroups.Count() gets decremented in DeleteSubgroup(), + // so we cannot do this. + nCount = pGroup->m_aSubgroups.Count(); for ( size_t nGroup = 0; nGroup < nCount; nGroup++ ) { pGroup->DeleteSubgroup(pGroup->m_aSubgroups[nGroup]); } - +#endif + while(pGroup->m_aSubgroups.Count() > 0) + pGroup->DeleteSubgroup(pGroup->m_aSubgroups[0]); + LineList *pLine = pGroup->m_pLine; if ( pLine != NULL ) { // notice that we may do this test inside the previous "if" because the -- 2.47.2