From: Nikolay Sivov nsivov@codeweavers.com
The 'child' pidl is a pointer whithin its parent pidl, it's only valid as long as the parent is still around.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shell32/shelldispatch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c index 0b2ad0ab0e2..06b853ca3dc 100644 --- a/dlls/shell32/shelldispatch.c +++ b/dlls/shell32/shelldispatch.c @@ -602,13 +602,12 @@ static HRESULT FolderItemVerbs_Constructor(BSTR path, FolderItemVerbs **verbs) if (SUCCEEDED(hr)) hr = SHBindToParent(pidl, &IID_IShellFolder, (void**)&folder, &child);
- CoTaskMemFree(pidl); - if (SUCCEEDED(hr)) hr = IShellFolder_GetUIObjectOf(folder, NULL, 1, &child, &IID_IContextMenu, NULL, (void**)&This->contextmenu);
if (folder) IShellFolder_Release(folder); + CoTaskMemFree(pidl);
This->hMenu = CreatePopupMenu(); if (SUCCEEDED(hr))