Code

po: update German translation
[ncmpc.git] / src / utils.c
index 6042848bced918cab0378fdd4764a7014f7c826b..b748580a05cb0b81f396c8dc413215699f02bcf3 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -79,10 +79,10 @@ gcmp_list_from_path(struct mpdclient *c, const gchar *path,
        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) {