File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/com/nccgroup/loggerplusplus/logview/logtable Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,11 @@ public class LogTable extends JTable
68
68
Integer sortColumn = this .preferences .getSetting (Globals .PREF_SORT_COLUMN );
69
69
SortOrder sortOrder = this .preferences .getSetting (Globals .PREF_SORT_ORDER );
70
70
if (sortColumn >= 0 && sortOrder != SortOrder .UNSORTED ){
71
- this .sorter .setSortKeys (Collections .singletonList (new RowSorter .SortKey (sortColumn , sortOrder )));
71
+ try {
72
+ this .sorter .setSortKeys (Collections .singletonList (new RowSorter .SortKey (sortColumn , sortOrder )));
73
+ }catch (IllegalArgumentException exception ){
74
+ //If we can't set the sort key because its invalid, just ignore it.
75
+ }
72
76
}
73
77
74
78
this .getSelectionModel ().addListSelectionListener (e -> {
You can’t perform that action at this time.
0 commit comments