From 91d04f21397cd391e13b583b2e500e8dbcfd038e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 17 Mar 2017 23:20:24 +0100 Subject: [PATCH] mpdclient: move volume reset to _status_free() Make sure that volume gets reset whenever status==NULL, also in mpdclient_disconnect(). --- src/mpdclient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.30.2