summaryrefslogtreecommitdiffstats
path: root/src/player.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/player.c b/src/player.c
index a8cb526..22c9f27 100644
--- a/src/player.c
+++ b/src/player.c
@@ -145,11 +145,9 @@ player_update(void)
const char *tmp;
status = mpd_run_status(player->conn);
- if (status == NULL) {
- fprintf(stderr, "MPD Fatal Error: %s\n",
+ if (status == NULL)
+ PANIC("MPD Fatal Error: %s",
mpd_connection_get_error_message(player->conn));
- exit(1);
- }
song = mpd_run_current_song(player->conn);
if (!song) {
@@ -204,11 +202,9 @@ player_update(void)
/* TODO move prev / next handling to own functions */
status = mpd_run_status(player->conn);
- if (status == NULL) {
- fprintf(stderr, "MPD Fatal Error: %s\n",
+ if (status == NULL)
+ PANIC("MPD Fatal Error: %s",
mpd_connection_get_error_message(player->conn));
- exit(1);
- }
song = mpd_run_current_song(player->conn);
if (song) {