added nil check for placer and refill

This commit is contained in:
TenPlus1 2018-02-08 11:27:23 +00:00
parent 1e7214a6ab
commit 8e18a4e4aa
1 changed files with 1 additions and 1 deletions

View File

@ -447,7 +447,7 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0})
if not farming.is_creative(placer:get_player_name()) then
if not placer or not farming.is_creative(placer:get_player_name()) then
local name = itemstack:get_name()