summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 56d921f..90c3feb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -404,13 +404,17 @@ int main (int argc, char **argv) {
if (curSong == NULL) {
BarUiMsg ("Receiving new playlist... ");
PianoDestroyPlaylist (&ph);
- PianoGetPlaylist (&ph, curStation->id);
- curSong = ph.playlist;
- if (curSong == NULL) {
- BarUiMsg ("No tracks left.\n");
- curStation = NULL;
+ if (PianoGetPlaylist (&ph, curStation->id) !=
+ PIANO_RET_OK) {
+ BarUiMsg ("Error.\n");
} else {
- BarUiMsg ("Ok.\n");
+ curSong = ph.playlist;
+ if (curSong == NULL) {
+ BarUiMsg ("No tracks left.\n");
+ curStation = NULL;
+ } else {
+ BarUiMsg ("Ok.\n");
+ }
}
}
if (curSong != NULL) {