mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[REGEDIT] Early return FALSE in CreateNewKey() if pszKeyPath is NULL (#6840)
This fixes unhandled exception when trying to create a new key in the root/"My computer". CORE-19567
This commit is contained in:
parent
cadfdc554d
commit
e79c896592
1 changed files with 2 additions and 0 deletions
|
@ -594,6 +594,8 @@ BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem)
|
|||
HTREEITEM hNewItem;
|
||||
|
||||
pszKeyPath = GetItemPath(hwndTV, hItem, &hRootKey);
|
||||
if (!pszKeyPath)
|
||||
return bSuccess;
|
||||
if (pszKeyPath[0] == L'\0')
|
||||
hKey = hRootKey;
|
||||
else if (RegOpenKeyW(hRootKey, pszKeyPath, &hKey) != ERROR_SUCCESS)
|
||||
|
|
Loading…
Reference in a new issue