Fix some placer nil checks

This commit is contained in:
sfan5 2024-01-11 15:50:36 +01:00 committed by GitHub
parent a3b171e317
commit 70cf7a26fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 18 deletions

View file

@ -625,7 +625,7 @@ function tnt.register_tnt(def)
groups = {dig_immediate = 2, mesecon = 2, tnt = 1, flammable = 5},
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
if placer and placer:is_player() then
local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name())
end