1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-28 20:56:02 +02:00

Add nil checks for placer

This commit is contained in:
DTA7
2017-10-01 15:41:58 +02:00
committed by sfan5
parent ca3e807d35
commit 0216fa08ec
14 changed files with 72 additions and 53 deletions

View File

@ -278,7 +278,7 @@ minetest.register_node("flowers:waterlily", {
local pos = pointed_thing.above
local node = minetest.get_node(pointed_thing.under)
local def = minetest.registered_nodes[node.name]
local player_name = placer:get_player_name()
local player_name = placer and placer:get_player_name() or ""
if def and def.on_rightclick then
return def.on_rightclick(pointed_thing.under, node, placer, itemstack,