diff --git a/base/applications/regedit/treeview.c b/base/applications/regedit/treeview.c index 958aae6cdc7..dc7d376c971 100644 --- a/base/applications/regedit/treeview.c +++ b/base/applications/regedit/treeview.c @@ -594,6 +594,8 @@ BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem) HTREEITEM hNewItem; pszKeyPath = GetItemPath(hwndTV, hItem, &hRootKey); + if (pszKeyPath==NULL) + return bSuccess; if (pszKeyPath[0] == L'\0') hKey = hRootKey; else if (RegOpenKeyW(hRootKey, pszKeyPath, &hKey) != ERROR_SUCCESS)