[REGEDIT] Check whether pszSelectKey is NULL on CDN_FILEOK (#5255)

Avoid crash on exporting root. Add NULL check of pszSelectKey on CDN_FILEOK handling. CORE-18938
This commit is contained in:
Katayama Hirofumi MZ 2023-04-25 18:04:36 +09:00 committed by GitHub
parent 560671a784
commit 9d7d3314b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -567,7 +567,7 @@ static UINT_PTR CALLBACK ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, W
{
GetWindowTextW(hwndExportBranchText, pszSelectedKey, _MAX_PATH);
}
else
else if (pszSelectedKey)
{
pszSelectedKey[0] = L'\0';
}