mirror of
https://github.com/reactos/reactos.git
synced 2025-01-15 18:43:27 +00:00
[SHELL32] Fix property sheets that can't be closed due to failed init (#4709)
When a PropertySheet fails to init, that fact is being logged and it shows an empty page, but it can't be closed. Handle second failure properly by using FAILED_UNEXPECTEDLY macro. CORE-18333
This commit is contained in:
parent
456f9f96e7
commit
32c20ab112
1 changed files with 10 additions and 3 deletions
|
@ -132,13 +132,20 @@ SH_ShowPropertiesDialog(LPCWSTR pwszPath, LPCITEMIDLIST pidlFolder, PCUITEMID_CH
|
|||
{
|
||||
pFileDefExt->AddRef(); // CreateInstance returns object with 0 ref count
|
||||
hr = pFileDefExt->Initialize(pidlFolder, pDataObj, NULL);
|
||||
if (SUCCEEDED(hr))
|
||||
if (!FAILED_UNEXPECTEDLY(hr))
|
||||
{
|
||||
hr = pFileDefExt->AddPages(AddPropSheetPageCallback, (LPARAM)&Header);
|
||||
if (FAILED(hr))
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
{
|
||||
ERR("AddPages failed\n");
|
||||
} else
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ERR("Initialize failed\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
LoadPropSheetHandlers(wszPath, &Header, MAX_PROPERTY_SHEET_PAGE - 1, hpsxa, pDataObj);
|
||||
|
|
Loading…
Reference in a new issue