diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java index 1c3d70ea124..7e30d75f817 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java @@ -200,7 +200,7 @@ long cellDataProc (long tree_column, long cell, long tree_model, long iter, long C.memmove (index, GTK.gtk_tree_path_get_indices (path), 4); TableItem item = _getItem (index[0]); GTK.gtk_tree_path_free (path); - if (item.isDisposed()) { + if (item == null || item.isDisposed()) { return 0; } if (item != null) OS.g_object_set_qdata (cell, Display.SWT_OBJECT_INDEX2, item.handle); 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 d216e183ad6..bbc1017e6de 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 @@ -276,7 +276,7 @@ static int checkStyle (int style) { long cellDataProc (long tree_column, long cell, long tree_model, long iter, long data) { if (cell == ignoreCell) return 0; TreeItem item = _getItem (iter); - if (item.isDisposed()) { + if (item == null || item.isDisposed()) { return 0; } if (item != null) OS.g_object_set_qdata (cell, Display.SWT_OBJECT_INDEX2, item.handle);