diff --git a/src/utils.c b/src/utils.c
index 6042848bced918cab0378fdd4764a7014f7c826b..84db64a5b122211081fc0df2a02e206411befb51 100644 (file)
--- a/src/utils.c
+++ b/src/utils.c
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) {