From dbfcc0d1ebbe36ecd7095b3e42c103b14916bd7a Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Fri, 26 Nov 2010 00:24:30 -0500 Subject: [PATCH] Made addon:ScanVendor() more fault-tolerant. --- Scanner.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Scanner.lua b/Scanner.lua index 0eb4a4a..25e68d7 100644 --- a/Scanner.lua +++ b/Scanner.lua @@ -1170,9 +1170,10 @@ do end -- Check the database to see if the vendor is listed as an acquire method. - local acquire = recipe_list[spell_id].acquire_data - local vendor_data = acquire[A.VENDOR] - local rep_data = acquire[A.REPUTATION] + local entry = recipe_list[spell_id] + local acquire = entry and entry.acquire_data or nil + local vendor_data = acquire and acquire[A.VENDOR] or nil + local rep_data = acquire and acquire[A.REPUTATION] or nil local found = false if vendor_data then @@ -1200,7 +1201,7 @@ do if not found then added = true - tinsert(output, string.format("Vendor ID missing from \"%s\" %d.", recipe_list[spell_id].name, spell_id)) + tinsert(output, string.format("Vendor ID missing from \"%s\" %d.", entry and entry.name or _G.UNKNOWN, spell_id)) end else --@debug@ -- 1.7.9.5