From: Vadim Zeitlin Date: Tue, 28 Oct 2003 10:55:05 +0000 (+0000) Subject: don't give error msg when deleting non existing keys neither (part of patch 830049) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/86a7257f11c83f7d584a4c1d639e38f3e56367c8 don't give error msg when deleting non existing keys neither (part of patch 830049) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index 8305c63eb8..0c0cda7752 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -683,7 +683,9 @@ bool wxRegKey::DeleteSelf() Close(); m_dwLastError = RegDeleteKey((HKEY) m_hRootKey, m_strKey); - if ( m_dwLastError != ERROR_SUCCESS ) { + // deleting a key which doesn't exist is not considered an error + if ( m_dwLastError != ERROR_SUCCESS && + m_dwLastError !- ERROR_FILE_NOT_FOUND ) { wxLogSysError(m_dwLastError, _("Can't delete key '%s'"), GetName().c_str()); return FALSE;