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 {