summaryrefslogtreecommitdiff
path: root/src/libpiano
diff options
context:
space:
mode:
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) {