mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 05:52:56 +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;
|
HTREEITEM hNewItem;
|
||||||
|
|
||||||
pszKeyPath = GetItemPath(hwndTV, hItem, &hRootKey);
|
pszKeyPath = GetItemPath(hwndTV, hItem, &hRootKey);
|
||||||
|
if (!pszKeyPath)
|
||||||
|
return bSuccess;
|
||||||
if (pszKeyPath[0] == L'\0')
|
if (pszKeyPath[0] == L'\0')
|
||||||
hKey = hRootKey;
|
hKey = hRootKey;
|
||||||
else if (RegOpenKeyW(hRootKey, pszKeyPath, &hKey) != ERROR_SUCCESS)
|
else if (RegOpenKeyW(hRootKey, pszKeyPath, &hKey) != ERROR_SUCCESS)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue