Check for failure of IShellFolder_GetDisplayNameOf.

This commit is contained in:
Huw D M Davies 2002-04-03 22:52:52 +00:00 committed by Alexandre Julliard
parent f5e0f0c60a
commit 0b8e8d10b7

View File

@ -1026,7 +1026,10 @@ BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath)
{
if (SHGetDesktopFolder(&shellfolder)==S_OK)
{
IShellFolder_GetDisplayNameOf(shellfolder,pidl,SHGDN_FORPARSING,&str);
if(!SUCCEEDED(IShellFolder_GetDisplayNameOf(shellfolder,pidl,SHGDN_FORPARSING,&str))) {
IShellFolder_Release(shellfolder);
return FALSE;
}
StrRetToStrNA (pszPath, MAX_PATH, &str, pidl);
IShellFolder_Release(shellfolder);
}