diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-01-26 17:34:30 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-01-26 17:34:30 +0100 |
| commit | 231398ebfff82c68ac33205da6fd957ec1e5cf09 (patch) | |
| tree | c2b72f587a82a807cd3501bb3ffb76dd33392b92 /src/player.c | |
| parent | 852d8efa882fe80718d63352b5432d2a04c2de74 (diff) | |
| download | tmus-231398ebfff82c68ac33205da6fd957ec1e5cf09.tar.gz tmus-231398ebfff82c68ac33205da6fd957ec1e5cf09.zip | |
Added index files, fixed cmd input bugs
Diffstat (limited to 'src/player.c')
| -rw-r--r-- | src/player.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/player.c b/src/player.c index 29c1ff3..d8f7b22 100644 --- a/src/player.c +++ b/src/player.c @@ -145,7 +145,11 @@ player_update(void) const char *tmp; status = mpd_run_status(player->conn); - ASSERT(status != NULL); + if (status == NULL) { + fprintf(stderr, "MPD Fatal Error: %s\n", + mpd_connection_get_error_message(player->conn)); + exit(1); + } song = mpd_run_current_song(player->conn); if (!song) { @@ -200,7 +204,11 @@ player_update(void) /* TODO move prev / next handling to own functions */ status = mpd_run_status(player->conn); - ASSERT(status != NULL); + if (status == NULL) { + fprintf(stderr, "MPD Fatal Error: %s\n", + mpd_connection_get_error_message(player->conn)); + exit(1); + } song = mpd_run_current_song(player->conn); if (song) { |
