Commit 474bf4fc authored by Mikołaj Zalewski's avatar Mikołaj Zalewski Committed by Alexandre Julliard

shell32: Make sure BrowseForFolder doesn't return NULL for the Desktop folder as…

shell32: Make sure BrowseForFolder doesn't return NULL for the Desktop folder as this means a cancel.
parent fa97fbdc
......@@ -524,7 +524,10 @@ static BOOL BrsFolder_OnCommand( browse_info *info, UINT id )
switch (id)
{
case IDOK:
info->pidlRet = ILClone(info->pidlRet); /* The original pidl will be free'd. */
/* The original pidl is owned by the treeview and will be free'd. */
info->pidlRet = ILClone(info->pidlRet);
if (info->pidlRet == NULL) /* A null pidl would mean a cancel */
info->pidlRet = _ILCreateDesktop();
pdump( info->pidlRet );
if (lpBrowseInfo->pszDisplayName)
SHGetPathFromIDListW( info->pidlRet, lpBrowseInfo->pszDisplayName );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment