nil check in after()

This commit is contained in:
tenplus1 2021-06-19 20:23:50 +01:00
parent 6ad91b84db
commit a566fa9acc
1 changed files with 4 additions and 1 deletions

View File

@ -119,7 +119,10 @@ local get_ambience = function(player, tod, name)
-- reset music timer after 10 minutes
minetest.after(60 * 10, function(name)
playing[name].music = -1
if playing[name] then
playing[name].music = -1
end
end, name)
end