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

Add nil checks for placer

This commit is contained in:
DTA7
2017-10-01 15:41:58 +02:00
committed by paramat
parent 3ae382c913
commit a2d7678ffd
14 changed files with 72 additions and 53 deletions

View File

@ -69,7 +69,8 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
-- Call on_rightclick if the pointed node defines it
if ndef and ndef.on_rightclick and
user and not user:get_player_control().sneak then
not (user and user:is_player() and
user:get_player_control().sneak) then
return ndef.on_rightclick(
pointed_thing.under,
node, user,