Fix crash in wxFileConfig when deleting last entry of the root group.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Apr 2012 22:25:19 +0000 (22:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Apr 2012 22:25:19 +0000 (22:25 +0000)
commita610eb7369be603460468f1e2ab894873a638ab0
treed4eb8996fd9575166d1a6e4b355bde65a75759b5
parent586bed94461ee212e159c6423d16798a20b43687
Fix crash in wxFileConfig when deleting last entry of the root group.

This resulted in keeping a dangling pointer to the group line in
wxFileConfigGroup and any attempt to use it after this resulted in a crash.
Fix this by explicitly resetting the last line in this case.

Also add a unit test for this scenario.

Closes #14243.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/fileconf.cpp
tests/config/fileconf.cpp