From: Kurt Van Dijck Date: Fri, 1 May 2015 22:07:37 +0000 (+0200) Subject: outputs: clear possible error X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=c3ddc8318b6f9452efde2d81e697051164d3ede5;p=ympd.git outputs: clear possible error --- diff --git a/src/mpd_client.c b/src/mpd_client.c index 654dced..d61e82f 100644 --- a/src/mpd_client.c +++ b/src/mpd_client.c @@ -465,7 +465,10 @@ int mpd_put_outputs(char *buffer, int names) mpd_output_get_id(out), mpd_output_get_enabled(out)); mpd_output_free(out); } - mpd_response_finish(mpd.conn); + if (!mpd_response_finish(mpd.conn)) { + mpd_connection_clear_error(mpd.conn); + return NULL; + } str += snprintf(str, strend-str, " }}"); return str-buffer; }