diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java index 0261a2a7d6..7b16cf816e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java @@ -512,8 +512,7 @@ public int getSelectionCount () { public int getSelectionIndex () { checkWidget(); int selection = OS.GTK_CLIST_SELECTION (handle); - if (selection == 0) return 0; - if (OS.g_list_length (selection) == 0) return -1; + if (selection == 0 || OS.g_list_length (selection) == 0) return -1; return OS.g_list_nth_data (selection, 0); } |