1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-11-26 14:57:17 +00:00

outputs: clear possible error

This commit is contained in:
Kurt Van Dijck 2015-05-02 00:07:37 +02:00
parent 0c3ded1cf3
commit c3ddc8318b

View File

@ -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;
}