From 8e18a4e4aa3a544c3ea0f4d382610e93e706de20 Mon Sep 17 00:00:00 2001
From: TenPlus1 <kinsellaja@yahoo.com>
Date: Thu, 8 Feb 2018 11:27:23 +0000
Subject: added nil check for placer and refill

---
 init.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'init.lua')

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()
 
-- 
cgit v1.2.3