[shell32]
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Mon, 11 Nov 2013 17:49:30 +0000 (17:49 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Mon, 11 Nov 2013 17:49:30 +0000 (17:49 +0000)
- Fix a couple of bugs I introduced in latest commit

svn path=/trunk/; revision=60945

reactos/dll/win32/shell32/shlfolder.cpp

index f15fc43..e821066 100644 (file)
@@ -171,7 +171,7 @@ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot,
                 LPCITEMIDLIST pidlChild, REFCLSID clsid, LPVOID * ppvOut)
 {
     HRESULT hr;
-    IShellFolder* pShellFolder;
+    IShellFolder* pShellFolder = NULL;
 
     TRACE ("%p %s %p\n", pidlRoot, debugstr_w(pathRoot), pidlChild);
 
@@ -218,10 +218,11 @@ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot,
         }
         ILFree (pidlAbsolute);
     }
-    TRACE ("-- (%p) ret=0x%08x\n", *ppvOut, hr);
 
     *ppvOut = pShellFolder;
 
+    TRACE ("-- (%p) ret=0x%08x\n", *ppvOut, hr);
+
     return hr;
 }