From: Max Kellermann Date: Sat, 7 Nov 2009 15:59:06 +0000 (+0100) Subject: screen_outputs: set list_window length to 0 if not connected X-Git-Tag: release-0.16~28 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cf9329cf0070b2692664222ee80d18ff1334575f;p=ncmpc.git screen_outputs: set list_window length to 0 if not connected The "length" wasn't set properly because we commented out the according line from clear_outputs_list(). --- diff --git a/src/screen_outputs.c b/src/screen_outputs.c index 43a9eaa..b0acf71 100644 --- a/src/screen_outputs.c +++ b/src/screen_outputs.c @@ -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) {