From 849337b9b62544df00c54a085038848fd8639f90 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 15 Apr 2004 04:55:54 +0000 Subject: [PATCH] Correct error handling in SHELL32_ParseNextElement(). --- dlls/shell32/shlfolder.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index 062e977688e..7dfbdd7a5ef 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -118,14 +118,16 @@ HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc, /* get the shellfolder for the child pidl and let it analyse further */ hr = IShellFolder_BindToObject (psf, *pidlInOut, pbc, &IID_IShellFolder, (LPVOID *) & psfChild); - if (SUCCEEDED (hr)) { + if (SUCCEEDED(hr)) { hr = IShellFolder_ParseDisplayName (psfChild, hwndOwner, pbc, szNext, pEaten, &pidlOut, pdwAttributes); IShellFolder_Release (psfChild); - pidlTemp = ILCombine (*pidlInOut, pidlOut); + if (SUCCEEDED(hr)) { + pidlTemp = ILCombine (*pidlInOut, pidlOut); - if (!pidlTemp) - hr = E_OUTOFMEMORY; + if (!pidlTemp) + hr = E_OUTOFMEMORY; + } if (pidlOut) ILFree (pidlOut);