summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-05-27 19:27:40 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-05-27 19:27:40 +0100
commitf8eab51e67ecfc6a2fd66b88e8fdd0c6a9ef7c23 (patch)
tree7aa65799eba266de59092e32ee48b3e57e8f82e4
parent20c6d2b9b95d88cc50aea6541493076f11b2b148 (diff)
added nil check for is_protected digger name
-rw-r--r--init.lua2
1 files changed, 2 insertions, 0 deletions
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