From c87736df1f86566f08fd7ab077b5f22890efe2ea Mon Sep 17 00:00:00 2001 From: Ulrich Czekalla Date: Wed, 13 Oct 1999 12:26:37 +0000 Subject: [PATCH] Prevent self referencing next pointer during insert. --- dlls/comctl32/treeview.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 3fd3ea082f0..5c241d60057 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -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;