Quantcast

If there's no item ID present, don't try to get the item info, instead just move on and complain to the person. (Ticket 451)

ackis [03-26-09 - 22:03]
If there's no item ID present, don't try to get the item info, instead just move on and complain to the person. (Ticket 451)
Filename
ARLFrame.lua
diff --git a/ARLFrame.lua b/ARLFrame.lua
index e5eaae2..f7088c5 100644
--- a/ARLFrame.lua
+++ b/ARLFrame.lua
@@ -2695,9 +2695,13 @@ function addon.RecipeItem_OnClick(button)
 			-- SHIFT
 			elseif (IsShiftKeyDown()) then
 				local itemID = recipeDB[clickedSpellIndex]["ItemID"]
-				local _, itemLink = GetItemInfo(itemID)
-				if (itemLink) then
-					ChatFrameEditBox:Insert(itemLink)
+				if (itemID) then
+					local _,itemLink = GetItemInfo(itemID)
+					if (itemLink) then
+						ChatFrameEditBox:Insert(itemLink)
+					else
+						addon:Print(L["NoItemLink"])
+					end
 				else
 					addon:Print(L["NoItemLink"])
 				end