Skip to content

Commit cc4f85f

Browse files
committed
[music] Prevent SetTrackVolume from propagating nil to Spring.SetSoundStreamVolume
1 parent 1767878 commit cc4f85f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LuaMenu/widgets/snd_music_lite.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ end
7474
--------------------------------------------------------------------------------
7575

7676
local function SetTrackVolume(volume)
77-
if volume == 0 then
77+
if not volume or volume == 0 then
7878
StopTrack()
7979
return
8080
end
@@ -183,7 +183,7 @@ function widget:Initialize()
183183
WG.LibLobby.lobby:AddListener("OnBattleAboutToStart", OnBattleAboutToStart)
184184

185185
WG.MusicHandler = MusicHandler
186-
186+
187187
WG.Delay(DelayedInitialize, 0.1)
188188
WG.Delay(DelayedInitialize, 1)
189189
end

0 commit comments

Comments
 (0)