Commit 81e15c5c authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Only release object if we actually got it.

parent 86cb1cec
......@@ -231,6 +231,7 @@ static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hPar
{
hr = IShellFolder_BindToObject(lpsf,pidlTemp,NULL,&IID_IShellFolder,(LPVOID*)&pSFChild);
if (SUCCEEDED(hr))
{
hr = IShellFolder_EnumObjects(pSFChild, hwnd, BrowseFlagsToSHCONTF(lpBrowseInfo->ulFlags), &pEnumIL);
if (SUCCEEDED(hr))
{
......@@ -242,6 +243,7 @@ static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hPar
}
IShellFolder_Release(pSFChild);
}
}
if (!(hPrev = InsertTreeViewItem(lpsf, pidlTemp, pidl, pEnumIL, hParent)))
goto Done;
......
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