From 331c94c24835a9920d534d113ba419df306c58f6 Mon Sep 17 00:00:00 2001
From: Michael Carlberg <c@rlberg.se>
Date: Thu, 2 Jun 2016 18:45:48 +0200
Subject: [PATCH] fix(volume): Handle non synced mute

---
 src/modules/volume.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/modules/volume.cpp b/src/modules/volume.cpp
index 4d7761bb..8ca9d05f 100644
--- a/src/modules/volume.cpp
+++ b/src/modules/volume.cpp
@@ -215,8 +215,12 @@ bool VolumeModule::handle_command(const std::string& cmd)
   } else if (cmd == EVENT_TOGGLE_MUTE) {
     if (master_mixer != nullptr)
       master_mixer->toggle_mute();
-    if (other_mixer != nullptr)
-      other_mixer->set_mute(!master_mixer->is_muted());
+    if (other_mixer != nullptr) {
+      if (master_mixer != nullptr)
+        other_mixer->set_mute(!master_mixer->is_muted());
+      else
+        other_mixer->toggle_mute();
+    }
   } else {
     return false;
   }