summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2017-02-11 12:39:41 +0100
committerWuzzy <almikes@aol.com>2017-02-11 12:39:41 +0100
commitdfd7cae20fd8003f69986c93169ddd6678384961 (patch)
treef1fd2a89815329f64b64fd94992403bf9c9a8be0
parent84a5f5f8c9c1c802972b3d643d4e913f00246acc (diff)
Fix crash with tools with empty digging groups
-rw-r--r--init.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 16895fd..3c028f2 100644
--- a/init.lua
+++ b/init.lua
@@ -1027,7 +1027,11 @@ doc.add_category("tools", {
end
-- Final tiebreaker: Sort by group name
else
- return comp[1].group < comp[2].group
+ if comp[1].group and comp[2].group then
+ return comp[1].group < comp[2].group
+ else
+ return false
+ end
end
end,
build_formspec = function(data, playername)