X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8709d9472bc45411b2123a82a8e6df2da21b3ffa..3287f62ad3bd6dfcc78a8fcef0ac44d9ece904af:/src/common/fileconf.cpp diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index ee79bdba34..e626c3c0cc 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 07.04.98 (adapted from appconf.cpp) -// RCS-ID: $Id$ // Copyright: (c) 1997 Karsten Ballueder & Vadim Zeitlin // Ballueder@usa.net // Licence: wxWindows licence @@ -46,7 +45,7 @@ #include "wx/stdpaths.h" -#if defined(__WXMSW__) +#if defined(__WINDOWS__) #include "wx/msw/private.h" #endif //windows.h #if defined(__WXPM__) @@ -1818,6 +1817,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);