summaryrefslogtreecommitdiff
path: root/crops/beans.lua
diff options
context:
space:
mode:
Diffstat (limited to 'crops/beans.lua')
-rw-r--r--crops/beans.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/crops/beans.lua b/crops/beans.lua
index 61b195b..a575956 100644
--- a/crops/beans.lua
+++ b/crops/beans.lua
@@ -32,7 +32,7 @@ local function place_beans(itemstack, placer, pointed_thing, plantname)
end
-- is player planting crop?
- local name = placer:get_player_name() or ""
+ local name = placer and placer:get_player_name() or ""
-- check for protection
if minetest.is_protected(pt.under, name) then