From: Hugh McMaster hugh.mcmaster@outlook.com
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com --- programs/regedit/framewnd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c index 83e4ec89ee0..c9eb2c4c469 100644 --- a/programs/regedit/framewnd.c +++ b/programs/regedit/framewnd.c @@ -946,9 +946,10 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) case ID_EDIT_RENAME: { WCHAR* keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); - if (keyPath == 0 || *keyPath == 0) { + if (!keyPath) { MessageBeep(MB_ICONHAND); - } else if (GetFocus() == g_pChildWnd->hTreeWnd) { + break; + } else if (*keyPath && GetFocus() == g_pChildWnd->hTreeWnd) { StartKeyRename(g_pChildWnd->hTreeWnd); } else if (GetFocus() == g_pChildWnd->hListWnd) { StartValueRename(g_pChildWnd->hListWnd);