Code

screen_outputs: set list_window length to 0 if not connected
authorMax Kellermann <max@duempel.org>
Sat, 7 Nov 2009 15:59:06 +0000 (16:59 +0100)
committerMax Kellermann <max@duempel.org>
Sat, 7 Nov 2009 15:59:06 +0000 (16:59 +0100)
The "length" wasn't set properly because we commented out the
according line from clear_outputs_list().

src/screen_outputs.c

index 43a9eaa344569c082bff8535abcaa4bb3e085a2e..b0acf7192ce9fe1c21615e15712d66b754bb57a8 100644 (file)
@@ -120,8 +120,10 @@ fill_outputs_list(struct mpdclient *c)
        assert(mpd_outputs != NULL);
 
        connection = mpdclient_get_connection(c);
-       if (connection == NULL)
+       if (connection == NULL) {
+               list_window_set_length(lw, 0);
                return;
+       }
 
        mpd_send_outputs(connection);
        while ((output = mpd_recv_output(connection)) != NULL) {