Fix bug when trying to remove station & none selected

This commit is contained in:
Nathan McRae 2025-05-21 22:49:05 -07:00
parent 306f169d08
commit 645b1f2414

View File

@ -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();