Fix bug when trying to remove station & none selected
This commit is contained in:
parent
306f169d08
commit
645b1f2414
@ -112,6 +112,9 @@ public class StationSelectionController {
|
||||
@FXML
|
||||
private void handleRemoveButtonPress(ActionEvent event) {
|
||||
int selectedIndex = stationListView.getSelectionModel().getSelectedIndex();
|
||||
if (selectedIndex < 0) {
|
||||
return;
|
||||
}
|
||||
StationSettings station = stationList.get(selectedIndex);
|
||||
String stationName = station.toString();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user