summaryrefslogtreecommitdiff
path: root/src/libpiano
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2017-10-02 12:12:01 +0200
committerLars-Dominik Braun <lars@6xq.net>2017-10-02 12:12:01 +0200
commit4dfca5b56b441faf4938b6c8e97585f68e468039 (patch)
tree325b622767611e0fc08c08f4792c1b85ca020f07 /src/libpiano
parent41a00cc1e643d9e9a69991ead268777ecd17c154 (diff)
downloadpianobar-4dfca5b56b441faf4938b6c8e97585f68e468039.tar.gz
pianobar-4dfca5b56b441faf4938b6c8e97585f68e468039.tar.bz2
pianobar-4dfca5b56b441faf4938b6c8e97585f68e468039.zip
Show station in song lists
Iff song’s station is not the current station. This is only the case for the song history right now. Closes #638
Diffstat (limited to 'src/libpiano')
-rw-r--r--src/libpiano/piano.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libpiano/piano.c b/src/libpiano/piano.c
index 72502f7..a189f34 100644
--- a/src/libpiano/piano.c
+++ b/src/libpiano/piano.c
@@ -219,7 +219,11 @@ void PianoDestroyRequest (PianoRequest_t *req) {
*/
PianoStation_t *PianoFindStationById (PianoStation_t * const stations,
const char * const searchStation) {
- assert (searchStation != NULL);
+ assert (stations != NULL);
+
+ if (searchStation == NULL) {
+ return NULL;
+ }
PianoStation_t *currStation = stations;
PianoListForeachP (currStation) {