[SHELL32] -CDesktopBrowser: Clone the pidl passed to SHOpenNewFrame as it will later...
[reactos.git] / reactos / dll / win32 / shell32 / shelldesktop / CDesktopBrowser.cpp
index 88481a6..dacc0c2 100644 (file)
@@ -285,7 +285,7 @@ HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT
      */
 
     DWORD dwFlags = ((wFlags & SBSP_EXPLOREMODE) != 0) ? SH_EXPLORER_CMDLINE_FLAG_E : 0; 
-    return SHOpenNewFrame((LPITEMIDLIST)pidl, NULL, 0, dwFlags);
+    return SHOpenNewFrame(ILClone(pidl), NULL, 0, dwFlags);
 }
 
 HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetViewStateStream(DWORD grfMode, IStream **ppStrm)