diff options
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) { |
