Allow passing NULL to ILFindLastID.

This commit is contained in:
Robert Shearman 2004-03-22 22:58:19 +00:00 committed by Alexandre Julliard
parent 17790040bf
commit f6e1be6afe
1 changed files with 5 additions and 1 deletions

View File

@ -183,10 +183,14 @@ BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl, LPVOID path)
* observed: pidl=Desktop return=pidl * observed: pidl=Desktop return=pidl
*/ */
LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl) LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl)
{ LPCITEMIDLIST pidlLast = pidl; {
LPCITEMIDLIST pidlLast = pidl;
TRACE("(pidl=%p)\n",pidl); TRACE("(pidl=%p)\n",pidl);
if (!pidl)
return NULL;
while (pidl->mkid.cb) while (pidl->mkid.cb)
{ {
pidlLast = pidl; pidlLast = pidl;