summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3dd3b3f)
raw | patch | inline | side by side (parent: 3dd3b3f)
author | Max Kellermann <max@duempel.org> | |
Sun, 28 Sep 2008 08:56:27 +0000 (10:56 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sun, 28 Sep 2008 08:56:27 +0000 (10:56 +0200) |
When deciding whether to repaint the current highlight, test if MPD is
actually playing. If MPD starts playing, repaint.
actually playing. If MPD starts playing, repaint.
src/screen_play.c | patch | blob | history |
diff --git a/src/screen_play.c b/src/screen_play.c
index 4ee131c70cfa09edb33a55b0f7872aefab4c4ae0..25e82c7ee1011365691722ba3fa0cd265fe2ee51 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
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;