X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..848332140be2d53aea32d0702f4c0e06c149d24b:/src/common/config.cpp diff --git a/src/common/config.cpp b/src/common/config.cpp index 22037a2cdd..8e5572cf39 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -225,8 +225,9 @@ bool wxConfigBase::DoWriteBool(const wxString& key, bool value) // ---------------------------------------------------------------------------- wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer, - const wxString& strEntry) + const wxString& strEntry) { + m_bChanged = false; m_pContainer = (wxConfigBase *)pContainer; // the path is everything which precedes the last slash @@ -243,7 +244,7 @@ wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer, { if ( m_pContainer->GetPath() != strPath ) { - // do change the path + // we do change the path so restore it later m_bChanged = true; /* JACS: work around a memory bug that causes an assert @@ -268,7 +269,6 @@ wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer, } else { // it's a name only, without path - nothing to do - m_bChanged = false; m_strName = strEntry; } }