summaryrefslogtreecommitdiff
path: root/src/libpiano
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2017-10-02 12:12:01 +0200
committerMichał Cichoń <michcic@gmail.com>2018-10-30 12:04:15 +0100
commited3ab2743344dfe2b38427733560b9847d259c8c (patch)
treebba0f0fd3ff661c13c3cb8d65566c73c0a58e13c /src/libpiano
parentf43a0894cb1386bbb5c0c1f068a4f60192070658 (diff)
downloadpianobar-windows-ed3ab2743344dfe2b38427733560b9847d259c8c.tar.gz
pianobar-windows-ed3ab2743344dfe2b38427733560b9847d259c8c.tar.bz2
pianobar-windows-ed3ab2743344dfe2b38427733560b9847d259c8c.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 c496ea1..7f1eff9 100644
--- a/src/libpiano/piano.c
+++ b/src/libpiano/piano.c
@@ -214,7 +214,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) {