From 6ca92d80ddb859fef30f45c71556f5296127875f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 28 Sep 2008 10:56:27 +0200 Subject: [PATCH] screen_play: repaint highlight when mpd starts playing When deciding whether to repaint the current highlight, test if MPD is actually playing. If MPD starts playing, repaint. --- src/screen_play.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/screen_play.c b/src/screen_play.c index 4ee131c..25e82c7 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -419,7 +419,8 @@ static void play_update(mpdclient_t *c) { static int prev_song_id; - int current_song_id = c->song != NULL ? c->song->id : 0; + int current_song_id = c->song != NULL && c->status != NULL && + !IS_STOPPED(c->status->state) ? c->song->id : 0; if (current_song_id != prev_song_id) { prev_song_id = current_song_id; -- 2.30.2