summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 4f5f2be..038ba6d 100644
--- a/init.lua
+++ b/init.lua
@@ -445,7 +445,7 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
end
-- is player planting seed?
- local name = placer:get_player_name() or ""
+ local name = placer and placer:get_player_name() or ""
-- if not protected then add node and remove 1 item from the itemstack
if not minetest.is_protected(pt.above, name) then