aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/screen_play.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/screen_play.c b/src/screen_play.c
index 4ee131c70..25e82c7ee 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;