summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index a404b7c..407537d 100644
--- a/init.lua
+++ b/init.lua
@@ -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()