# HG changeset patch # User contrebasse # Date 1303934133 -7200 # Node ID 8acb6dc1ff9efb247bcc47c8af4b9f2891d134c4 # Parent a5a3e5e14ef7433853bed4e71c53075b182ab4ed Avoid a lua error when the reagent is not found diff -r a5a3e5e14ef7 -r 8acb6dc1ff9e ReagentMaker.lua --- a/ReagentMaker.lua Wed Apr 27 19:14:06 2011 +0200 +++ b/ReagentMaker.lua Wed Apr 27 21:55:33 2011 +0200 @@ -42,7 +42,7 @@ -- Scan availabe recipes A:ScanSimpleRecipes() - + -- Show makables reagents A.updateCounts(GetTradeSkillSelectionIndex()) end @@ -203,7 +203,10 @@ if A.data[reagentID].spell then link = GetSpellLink(A.data[reagentID].spellID) else - link = GetTradeSkillRecipeLink(A.findSkillIndex(reagentID)) + local index = A.findSkillIndex(reagentID) + if index then + link = GetTradeSkillRecipeLink(A.findSkillIndex(reagentID)) + end end if link then A.tooltipRecipe:SetOwner(btn)