From 9be3ad862d535e91c98e75aa58ec9411e2f4c3bb Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Sun, 6 Mar 2011 16:56:28 -0600 Subject: [PATCH] Gracefully handle recipes which are taught by undefined trainers - the GUI shouldn't crash and burn. --- Interface/List.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Interface/List.lua b/Interface/List.lua index c06bf72..94ae974 100644 --- a/Interface/List.lua +++ b/Interface/List.lua @@ -1045,7 +1045,7 @@ function private.InitializeListFrame() local function ExpandTrainerData(entry_index, entry_type, parent_entry, id_num, recipe_id, hide_location, hide_type) local trainer = private.trainer_list[id_num] - if not CanDisplayFaction(trainer.faction) then + if not trainer or not CanDisplayFaction(trainer.faction) then return entry_index end @@ -1609,7 +1609,7 @@ do local function Tooltip_AddTrainer(id_num, location, addline_func) local trainer = private.trainer_list[id_num] - if location and trainer.location ~= location then + if not trainer or (location and trainer.location ~= location) then return end local display_tip, name_color = GetTipFactionInfo(trainer.faction) -- 1.7.9.5