diff --git a/src/utils.c b/src/utils.c
index 6042848bced918cab0378fdd4764a7014f7c826b..b748580a05cb0b81f396c8dc413215699f02bcf3 100644 (file)
--- a/src/utils.c
+++ b/src/utils.c
/* ncmpc (Ncurses MPD Client)
- * (c) 2004-2009 The Music Player Daemon Project
+ * (c) 2004-2010 The Music Player Daemon Project
* Project homepage: http://musicpd.org
* This program is free software; you can redistribute it and/or modify
struct mpd_connection *connection;
struct mpd_entity *entity;
- if (!mpdclient_is_connected(c))
+ connection = mpdclient_get_connection(c);
+ if (connection == NULL)
return list;
- connection = mpdclient_get_connection(c);
mpd_send_list_meta(connection, path);
while ((entity = mpd_recv_entity(connection)) != NULL) {