From 3cc487d140f11e26a9c4ae35ba87cc22684da65a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 14 Oct 2000 20:28:18 +0000 Subject: [PATCH] fixed false alert in wxRegKey::DeleteSelf git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/registry.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index c67b5ba3d5..978d7ee4fa 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -620,8 +620,9 @@ bool wxRegKey::DeleteSelf() // prevent a buggy program from erasing one of the root registry keys or an // immediate subkey (i.e. one which doesn't have '\\' inside) of any other // key except HKCR (HKCR has some "deleteable" subkeys) - if ( m_strKey.IsEmpty() || (m_hRootKey != HKCR && - m_strKey.Find(REG_SEPARATOR) == wxNOT_FOUND) ) { + if ( m_strKey.IsEmpty() || + ((m_hRootKey != (WXHKEY) aStdKeys[HKCR].hkey) && + (m_strKey.Find(REG_SEPARATOR) == wxNOT_FOUND)) ) { wxLogError(_("Registry key '%s' is needed for normal system operation,\ndeleting it will leave your system in unusable state:\noperation aborted."), GetFullName(this)); return FALSE; -- 2.50.0