From c3ddc8318b6f9452efde2d81e697051164d3ede5 Mon Sep 17 00:00:00 2001 From: Kurt Van Dijck Date: Sat, 2 May 2015 00:07:37 +0200 Subject: [PATCH] outputs: clear possible error --- src/mpd_client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.20.1