From 10abb996c10c310f8cea66e7e085b852897a0a23 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Tue, 19 Jun 2018 18:42:13 +0100 Subject: nil check --- crops/beans.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crops/beans.lua') 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 -- cgit v1.2.3