https://git.reactos.org/?p=reactos.git;a=commitdiff;h=231ac99414f3cc3f7cd36f...
commit 231ac99414f3cc3f7cd36fa084463ae781895eb5 Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Sat Dec 16 15:25:52 2023 +0100 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Sat Dec 16 15:25:52 2023 +0100
[BROWSEUI] Fix item deletion in CExplorerBand::OnTreeItemDeleted().
Addendum to commit 1b634b38e (r73706) CORE-10838
The TVN_DELETEITEM notification sends the info about the item to be deleted in the itemOld member of the NMTREEVIEW structure, and not in the itemNew one! --- dll/win32/browseui/explorerband.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dll/win32/browseui/explorerband.cpp b/dll/win32/browseui/explorerband.cpp index 5c90d5d9dd7..18ea0c2fe77 100644 --- a/dll/win32/browseui/explorerband.cpp +++ b/dll/win32/browseui/explorerband.cpp @@ -347,7 +347,7 @@ BOOL CExplorerBand::OnTreeItemExpanding(LPNMTREEVIEW pnmtv) BOOL CExplorerBand::OnTreeItemDeleted(LPNMTREEVIEW pnmtv) { /* Destroy memory associated to our node */ - NodeInfo* ptr = GetNodeInfo(pnmtv->itemNew.hItem); + NodeInfo* ptr = GetNodeInfo(pnmtv->itemOld.hItem); if (ptr) { ILFree(ptr->relativePidl);