summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-02-08 11:27:23 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2018-02-08 11:27:23 +0000
commit8e18a4e4aa3a544c3ea0f4d382610e93e706de20 (patch)
tree9e8b1bb8f0b848273383b3f7a2bd122c2568c2d7 /init.lua
parent1e7214a6abc9a04bef78f028a76dc5d1d5bd7f28 (diff)
added nil check for placer and refill
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 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()