Skip to content

Commit 6ccc99a

Browse files
committed
[music] Prevent SetTrackVolume from propagating nil to Spring.SetSoundStreamVolume
1 parent 7abb4d4 commit 6ccc99a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

LuaMenu/widgets/snd_music_lite.lua

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

7575
local function SetTrackVolume(volume)
76-
if volume == 0 then
76+
if not volume or volume == 0 then
7777
StopTrack()
7878
return
7979
end
@@ -182,7 +182,7 @@ function widget:Initialize()
182182
WG.LibLobby.lobby:AddListener("OnBattleAboutToStart", OnBattleAboutToStart)
183183

184184
WG.MusicHandler = MusicHandler
185-
185+
186186
WG.Delay(DelayedInitialize, 0.1)
187187
WG.Delay(DelayedInitialize, 1)
188188
end

0 commit comments

Comments
 (0)