diff --git a/src/screen_file.c b/src/screen_file.c
index d9faa69ac66430032a736b971de0211b9a8db7dc..67dc3e081182da8addac2436b3b77b54103b1e8b 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
{
struct mpd_connection *connection;
- if (!mpdclient_is_connected(c))
- return;
-
connection = mpdclient_get_connection(c);
+ if (connection == NULL)
+ return;
mpd_send_list_meta(connection, current_path);
filelist_recv(filelist, connection);
char *str, *buf;
int key;
+ if (connection == NULL)
+ return;
+
list_window_get_range(browser.lw, &range);
for (unsigned i = range.start; i < range.end; ++i) {
struct filelist_entry *entry =