From ed3ab2743344dfe2b38427733560b9847d259c8c Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 2 Oct 2017 12:12:01 +0200 Subject: Show station in song lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Iff song’s station is not the current station. This is only the case for the song history right now. Closes #638 --- src/libpiano/piano.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libpiano') 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) { -- cgit v1.2.3