diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2010-12-26 15:38:59 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2010-12-26 15:38:59 +0100 |
commit | d074480b9159a53fc4e6bdb40463289c69c2f6a7 (patch) | |
tree | 65c4349d7d3b3c292acf51e41a5a566853a94af1 | |
parent | 168fbd94f4f1ce710a80603db63478bda31c60f8 (diff) | |
download | pianobar-d074480b9159a53fc4e6bdb40463289c69c2f6a7.tar.gz pianobar-d074480b9159a53fc4e6bdb40463289c69c2f6a7.tar.bz2 pianobar-d074480b9159a53fc4e6bdb40463289c69c2f6a7.zip |
Show message if no station is available
-rw-r--r-- | src/ui.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -302,6 +302,11 @@ PianoStation_t *BarUiSelectStation (PianoHandle_t *ph, const char *prompt, size_t stationCount, i; int input; + if (ph->stations == NULL) { + BarUiMsg (MSG_ERR, "No station available.\n"); + return NULL; + } + /* sort and print stations */ sortedStations = BarSortedStations (ph->stations, &stationCount, order); for (i = 0; i < stationCount; i++) { |