summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2016-04-14 16:21:34 +0200
committerLars-Dominik Braun <lars@6xq.net>2016-04-14 16:25:13 +0200
commit0ec2df77a72edde7b65a4ac8e7ffff4470120a51 (patch)
treef42ccee095dead476f58700991de24ba00e07177 /src/ui.c
parent8c06a59a34b5d9bba277a50198fe2dd50d832da3 (diff)
downloadpianobar-0ec2df77a72edde7b65a4ac8e7ffff4470120a51.tar.gz
pianobar-0ec2df77a72edde7b65a4ac8e7ffff4470120a51.tar.bz2
pianobar-0ec2df77a72edde7b65a4ac8e7ffff4470120a51.zip
Fix songfinish event when changing stations
The event did not contain any song data (title, artist, …), because the playlist was destroyed by the ui command. Now the actual station switch is deferred by introducing nextStation and letting the main loop handle it. Fixes issue #584.
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui.c b/src/ui.c
index c2a55df..5350dea 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -802,7 +802,8 @@ void BarUiStartEventCmd (const BarSettings_t *settings, const char *type,
pipeWriteFd = fdopen (pipeFd[1], "w");
- if (curSong != NULL && stations != NULL && curStation->isQuickMix) {
+ if (curSong != NULL && stations != NULL && curStation != NULL &&
+ curStation->isQuickMix) {
songStation = PianoFindStationById (stations, curSong->stationId);
}