fixed removing the children in ShellBrowser::InsertSubitems() Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp _____
Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp --- trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp 2006-01-07 17:10:51 UTC (rev 20662) +++ trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp 2006-01-07 18:19:10 UTC (rev 20663) @@ -293,6 +293,7 @@
int ShellBrowser::InsertSubitems(HTREEITEM hParentItem, Entry* entry, IShellFolder* pParentFolder) { + HTREEITEM hchild, hnext; CONTEXT("ShellBrowser::InsertSubitems()");
WaitCursor wait; @@ -308,7 +309,8 @@ }
// remove old children items - for(HTREEITEM hchild,hnext=TreeView_GetChild(_left_hwnd, hParentItem); hchild=hnext; ) { + hnext = hchild = TreeView_GetChild(_left_hwnd, hParentItem); + while((hchild=hnext) != NULL) { hnext = TreeView_GetNextSibling(_left_hwnd, hchild); TreeView_DeleteItem(_left_hwnd, hchild); }