Code

screen_queue: always update the list size
authorMax Kellermann <max@duempel.org>
Wed, 30 Dec 2009 20:06:31 +0000 (21:06 +0100)
committerMax Kellermann <max@duempel.org>
Wed, 30 Dec 2009 20:28:55 +0000 (21:28 +0100)
This fixes an assertion failure.

NEWS
src/screen_queue.c

diff --git a/NEWS b/NEWS
index c1c83425c69e0bed722324b372652a173d9ad8bd..31f5e172e862e28ff270761daa6b4d15b0d73c4c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
 ncmpc 0.17 - not yet released
+* screen_queue: always update the list size
 
 
 ncmpc 0.16 - (12/25/2009)
index fbcc18039a98d593e8cf6d153fb00c47f4c6a263..1ca3d62adabca9ca0feed0b6ee7a797147ee660d 100644 (file)
@@ -550,6 +550,10 @@ screen_queue_update(struct mpdclient *c)
 {
        if (c->events & MPD_IDLE_QUEUE)
                screen_queue_restore_selection();
+       else
+               /* the queue size may have changed, even if we havn't
+                  revceived the QUEUE idle event yet */
+               list_window_set_length(lw, playlist_length(playlist));
 
        if (((c->events & MPD_IDLE_PLAYER) != 0 &&
             screen_queue_song_change(c->status)) ||