From 90baece6b256aebe71d91dea844a6c57fff27929 Mon Sep 17 00:00:00 2001 From: Vasili Gulevich Date: Tue, 23 Jan 2024 18:15:15 +0000 Subject: [PATCH] [GTK] Added another assertion #882 --- .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index 93518aa8c4..ea8f69239e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java @@ -3366,7 +3366,8 @@ void _setItemCount (TreeItem parentItem, long parentIter, List items, try { for (int i = oldSize; i < count; i++) { GTK.gtk_tree_store_insert_after (modelHandle, createdIter, parentIter, i == 0 ? 0 : modificationIter); - new TreeItem (this, parentItem, SWT.NONE, i, createdIter); + TreeItem result = new TreeItem (this, parentItem, SWT.NONE, i, createdIter); + assert items.get(i) == result : "TreeItem should self-insert into sibling list"; C.memmove (modificationIter, createdIter, GTK.GtkTreeIter_sizeof ()); } } finally {