Prevent self referencing next pointer during insert.

This commit is contained in:
Ulrich Czekalla 1999-10-13 12:26:37 +00:00 committed by Alexandre Julliard
parent febd2db82e
commit c87736df1f

View file

@ -1721,6 +1721,7 @@ TREEVIEW_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
switch ((DWORD) ptdi->hInsertAfter) {
case (DWORD) TVI_FIRST:
if (sibItem==wineItem) break;
if (wineItem->parent) {
wineItem->sibling=parentItem->firstChild;
parentItem->firstChild=(HTREEITEM)iItem;