Re: shell32: make sure BrowseForFolder doesn't return NULL for the Desktop folder as this means a cancel (should fix bug #5533)
Mikołaj Zalewski wrote:
+/************************************************************************* + * _ILMakePidlNotNull + * + * A null pidl is a valid pidl that represents the Desktop. However if we don't + * want a NULL pidl (e.g. because NULL indicates an error) this function will + * make an explicit empty pidl if the parameter is NULL. + */ +HRESULT _ILMakePidlNotNull(LPITEMIDLIST *pidl) +{ + if (*pidl == NULL) + *pidl = _ILCreateDesktop(); + if (*pidl == NULL) + return E_OUTOFMEMORY; + return S_OK; +}
This function is a bit ugly. It seems this policy should be made in the BrsFolder_OnCommand function, rather than in pidl.c as a file. -- Rob Shearman
This function is a bit ugly. It seems this policy should be made in the BrsFolder_OnCommand function, rather than in pidl.c as a file.
Yes, after I've found _ILCreateDesktop there is no need for a helper funciton. I'll send a patch without it. Mikolaj Zalewski
participants (2)
-
Mikołaj Zalewski -
Robert Shearman