[ros-diffs] [weiden] 20663: fixed removing the children in ShellBrowser::InsertSubitems()

weiden at svn.reactos.org weiden at svn.reactos.org
Sat Jan 7 19:19:24 CET 2006


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);
 	}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20060107/f8d7e1fa/attachment.html


More information about the Ros-diffs mailing list