X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..5c250a10332dc17263c66deb629b5fa8c4320f8a:/src/msw/registry.cpp diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index 8305c63eb8..26657e9c5d 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;