From 414e2e772506b0ca30afa7284dbf569faaddd3d1 Mon Sep 17 00:00:00 2001 From: cora Date: Mon, 14 Feb 2022 13:27:21 +0100 Subject: [PATCH] fix crash on opening villager formspec --- mods/ITEMS/mcl_enchanting/groupcaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_enchanting/groupcaps.lua b/mods/ITEMS/mcl_enchanting/groupcaps.lua index ec8d11d21e..2a83727729 100644 --- a/mods/ITEMS/mcl_enchanting/groupcaps.lua +++ b/mods/ITEMS/mcl_enchanting/groupcaps.lua @@ -43,7 +43,7 @@ end -- the tool needs to be updated. function mcl_enchanting.update_groupcaps(itemstack) local name = itemstack:get_name() - if not minetest.registered_tools[name].tool_capabilities then + if not minetest.registered_tools[name] or not minetest.registered_tools[name].tool_capabilities then return end