From 26627b414018fa6eba79fbfeffa00a67d8aca087 Mon Sep 17 00:00:00 2001 From: Craig Drummond Date: Wed, 19 Sep 2018 17:16:53 +0100 Subject: [PATCH] If HTTP stream is not enabled, return -1 for volume --- mpd-interface/httpstream.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mpd-interface/httpstream.cpp b/mpd-interface/httpstream.cpp index b3acdbf41..2a9426114 100644 --- a/mpd-interface/httpstream.cpp +++ b/mpd-interface/httpstream.cpp @@ -106,6 +106,10 @@ void HttpStream::setVolume(int vol) int HttpStream::volume() { + if (!enabled) { + return -1; + } + int vol=currentVolume; if (player && !isMuted()) { #ifdef LIBVLC_FOUND