Skip to content

Commit b66033b

Browse files
committed
[Gtk]Guard Tree/Table cellDataProc against null item
Should help with #2478
1 parent f6de513 commit b66033b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ long cellDataProc (long tree_column, long cell, long tree_model, long iter, long
200200
C.memmove (index, GTK.gtk_tree_path_get_indices (path), 4);
201201
TableItem item = _getItem (index[0]);
202202
GTK.gtk_tree_path_free (path);
203-
if (item.isDisposed()) {
203+
if (item == null || item.isDisposed()) {
204204
return 0;
205205
}
206206
if (item != null) OS.g_object_set_qdata (cell, Display.SWT_OBJECT_INDEX2, item.handle);

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static int checkStyle (int style) {
276276
long cellDataProc (long tree_column, long cell, long tree_model, long iter, long data) {
277277
if (cell == ignoreCell) return 0;
278278
TreeItem item = _getItem (iter);
279-
if (item.isDisposed()) {
279+
if (item == null || item.isDisposed()) {
280280
return 0;
281281
}
282282
if (item != null) OS.g_object_set_qdata (cell, Display.SWT_OBJECT_INDEX2, item.handle);

0 commit comments

Comments
 (0)