From f8eab51e67ecfc6a2fd66b88e8fdd0c6a9ef7c23 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 27 May 2017 19:27:40 +0100 Subject: [PATCH] added nil check for is_protected digger name --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 0441ad6..13956ac 100644 --- a/init.lua +++ b/init.lua @@ -264,6 +264,8 @@ protector.old_is_protected = minetest.is_protected -- check for protected area, return true if protected and digger isn't on list function minetest.is_protected(pos, digger) + digger = digger or "" -- nil check + -- is area protected against digger? if not protector.can_dig(protector.radius, pos, digger, false, 1) then