From: Max Kellermann Date: Fri, 17 Mar 2017 22:20:24 +0000 (+0100) Subject: mpdclient: move volume reset to _status_free() X-Git-Tag: v0.26~51 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=91d04f21397cd391e13b583b2e500e8dbcfd038e;p=ncmpc.git mpdclient: move volume reset to _status_free() Make sure that volume gets reset whenever status==NULL, also in mpdclient_disconnect(). --- diff --git a/src/mpdclient.c b/src/mpdclient.c index e1aee1c..1393751 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -126,6 +126,8 @@ mpdclient_status_free(struct mpdclient *c) mpd_status_free(c->status); c->status = NULL; + + c->volume = -1; } void @@ -196,8 +198,6 @@ mpdclient_update(struct mpdclient *c) { struct mpd_connection *connection = mpdclient_get_connection(c); - c->volume = -1; - if (connection == NULL) return false;