From ea5426316ecbde8b99218193b1b550a792473271 Mon Sep 17 00:00:00 2001 From: Argyle Date: Thu, 14 Mar 2019 20:13:16 -0400 Subject: [PATCH] Crash fix - check if description is nil before trying to search it. (#3) --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 49488a1..393727f 100644 --- a/init.lua +++ b/init.lua @@ -10,7 +10,9 @@ toolranks.colors = { } function toolranks.get_tool_type(description) - if string.find(description, "Pickaxe") then + if not description then + return "tool" + elseif string.find(description, "Pickaxe") then return "pickaxe" elseif string.find(description, "Axe") then return "axe"