Quantcast

Check to see if TradeSkillFrame exists before checking to see if it's visible.

torhal [11-20-09 - 14:48]
Check to see if TradeSkillFrame exists before checking to see if it's visible.
Filename
ARLFrame.lua
AckisRecipeList.lua
diff --git a/ARLFrame.lua b/ARLFrame.lua
index 002817d..ce5ecf1 100644
--- a/ARLFrame.lua
+++ b/ARLFrame.lua
@@ -558,8 +558,6 @@ do
 		--			end
 		--		end

-		local autoscanmap = addon.db.profile.autoscanmap
-
 		twipe(maplist)

 		-- We're only getting a single recipe, not a bunch
@@ -570,7 +568,7 @@ do
 					maplist[v["ID"]] = v["Type"]
 				end
 			end
-		elseif autoscanmap then
+		elseif addon.db.profile.autoscanmap then
 			local sorted_recipes = addon.sorted_recipes

 			-- Scan through all recipes to display, and add the vendors to a list to get their acquire info
diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua
index ceeabac..2be5bc6 100644
--- a/AckisRecipeList.lua
+++ b/AckisRecipeList.lua
@@ -1409,7 +1409,7 @@ do
 	-- @param textdump Boolean indicating if we want the output to be a text dump, or if we want to use the ARL GUI.
 	-- @return A frame with either the text dump, or the ARL frame.
 	function addon:Scan(textdump)
-		if not TradeSkillFrame:IsVisible() then
+		if not TradeSkillFrame or not TradeSkillFrame:IsVisible() then
 			self:Print(L["OpenTradeSkillWindow"])
 			return
 		end