Fix bug when selected station doesn't exist
This commit is contained in:
parent
741055b200
commit
00832e92bf
@ -171,8 +171,12 @@ public class MainController implements Initializable {
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
// TODO: if there are no stations, then create a default station and select that
|
||||
|
||||
if (selectedStation == null) {
|
||||
// TODO: create a new station and save it?
|
||||
logger.log(Level.SEVERE, "Selected station '" + selectedStationName.get() + "' not found");
|
||||
selectedStation = settings.getStations().get(0);
|
||||
selectedStationName.set(selectedStation.getName());
|
||||
}
|
||||
|
||||
messageTextArea.addEventFilter(KeyEvent.ANY, event -> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user