Use empty string for protection check if puncher or clicker is nil.

This commit is contained in:
auouymous
2020-12-10 03:53:50 -07:00
committed by Vitaliy
parent 29ec26a4c8
commit 397d449f1e
3 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ mesecon.register_node("mesecons_blinkyplant:blinky_plant", {
},
on_timer = on_timer,
on_rightclick = function(pos, node, clicker)
if minetest.is_protected(pos, clicker and clicker:get_player_name()) then
if minetest.is_protected(pos, clicker and clicker:get_player_name() or "") then
return
end