mirror of
https://codeberg.org/tenplus1/ambience.git
synced 2025-01-23 16:20:21 +01:00
nil check in after()
This commit is contained in:
parent
6ad91b84db
commit
a566fa9acc
5
init.lua
5
init.lua
@ -119,7 +119,10 @@ local get_ambience = function(player, tod, name)
|
|||||||
|
|
||||||
-- reset music timer after 10 minutes
|
-- reset music timer after 10 minutes
|
||||||
minetest.after(60 * 10, function(name)
|
minetest.after(60 * 10, function(name)
|
||||||
playing[name].music = -1
|
|
||||||
|
if playing[name] then
|
||||||
|
playing[name].music = -1
|
||||||
|
end
|
||||||
end, name)
|
end, name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user