fix java.lang.IllegalArgumentException: Row index out of range when history is empty

This commit is contained in:
Bas Leijdekkers
2014-05-22 13:18:08 +02:00
parent b553f5c960
commit bdeea08a53
@@ -410,7 +410,10 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton {
treeView.scrollRectToVisible(treeView.getCellRect(lastRow, 0, true));
}
}
myDualView.getFlatView().addRowSelectionInterval(0, 0);
final TableView flatView = myDualView.getFlatView();
if (flatView.getRowCount() > 0) {
flatView.addRowSelectionInterval(0, 0);
}
myInRefresh = false;
myTargetSelection = null;