fix nil check

This commit is contained in:
tenplus1 2021-07-13 16:05:42 +01:00
parent d0cea9d033
commit e19fca8446
1 changed files with 2 additions and 1 deletions

View File

@ -104,7 +104,8 @@ end)
local get_ambience = function(player, tod, name)
-- play server or local music if music enabled and music not already playing
if play_music and MUSICVOLUME > 0 and playing[name].music < 0 then
if play_music and MUSICVOLUME > 0
and playing[name] and playing[name].music < 0 then
-- count backwards
playing[name].music = playing[name].music -1