From: Piotr Caban Subject: shell32: Handle TRASH_EnumItems failures correctly Message-Id: <54C775B1.4060206@codeweavers.com> Date: Tue, 27 Jan 2015 12:25:37 +0100 --- dlls/shell32/recyclebin.c | 13 +++++++++++-- dlls/shell32/tests/recyclebin.c | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/dlls/shell32/recyclebin.c b/dlls/shell32/recyclebin.c index d839329..d1a116e 100644 --- a/dlls/shell32/recyclebin.c +++ b/dlls/shell32/recyclebin.c @@ -860,10 +860,14 @@ HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryR LPITEMIDLIST *apidl; INT cidl; INT i=0; + HRESULT hr; + TRACE("(%s, %p)\n", debugstr_w(pszRootPath), pSHQueryRBInfo); FIXME("Ignoring pszRootPath=%s\n",debugstr_w(pszRootPath)); - TRASH_EnumItems(&apidl,&cidl); + hr = TRASH_EnumItems(&apidl,&cidl); + if (FAILED(hr)) + return hr; pSHQueryRBInfo->i64NumItems = cidl; pSHQueryRBInfo->i64Size = 0; for (; i