guiVolumeChange: Fix child not being removed
authorANAND <ClobberXD@gmail.com>
Thu, 8 Aug 2019 15:41:23 +0000 (21:11 +0530)
committersfan5 <sfan5@live.de>
Thu, 8 Aug 2019 16:03:35 +0000 (18:03 +0200)
src/gui/guiVolumeChange.cpp

index e0cb6fa729b7ec846ad04df98a1edd3a5eb58c71..45d2ee13994ce2ba9fb3388e39f9a46f6af8a7fd 100644 (file)
@@ -58,6 +58,9 @@ void GUIVolumeChange::removeChildren()
 
        if (gui::IGUIElement *e = getElementFromId(ID_soundSlider))
                e->remove();
+
+       if (gui::IGUIElement *e = getElementFromId(ID_soundMuteButton))
+               e->remove();
 }
 
 void GUIVolumeChange::regenerateGui(v2u32 screensize)
@@ -193,4 +196,3 @@ bool GUIVolumeChange::OnEvent(const SEvent& event)
 
        return Parent ? Parent->OnEvent(event) : false;
 }
-