explorerframe: Fix INameSpaceTreeControl::RemoveRoot.
authorDavid Hedberg <david.hedberg@gmail.com>
Mon, 16 Aug 2010 07:17:31 +0000 (09:17 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 17 Aug 2010 12:21:31 +0000 (14:21 +0200)
The root shellitem was being freed before getting passed to the event sink.

dlls/explorerframe/nstc.c

index 320b67d0a09ba10b6c09c107affe490fd69bc7be..e00249d53878ef24334295288a412be23a60c9dc 100644 (file)
@@ -647,8 +647,8 @@ static HRESULT WINAPI NSTC2_fnRemoveRoot(INameSpaceTreeControl2* iface,
     TRACE("root %p\n", root);
     if(root)
     {
-        SendMessageW(This->hwnd_tv, TVM_DELETEITEM, 0, (LPARAM)root->htreeitem);
         events_OnItemDeleted(This, root->psi, TRUE);
+        SendMessageW(This->hwnd_tv, TVM_DELETEITEM, 0, (LPARAM)root->htreeitem);
         list_remove(&root->entry);
         HeapFree(GetProcessHeap(), 0, root);
         return S_OK;