From d074480b9159a53fc4e6bdb40463289c69c2f6a7 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 26 Dec 2010 15:38:59 +0100 Subject: Show message if no station is available --- src/ui.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ui.c') diff --git a/src/ui.c b/src/ui.c index cef067d..3edccc7 100644 --- a/src/ui.c +++ b/src/ui.c @@ -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++) { -- cgit v1.2.3