Mercurial > wow > wowdb-profiler
comparison Main.lua @ 58:63f7286e5d13
Check for nil NPC in TRAINER_SHOW.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Tue, 03 Jul 2012 20:25:17 -0500 |
parents | 11fcae12db20 |
children | 059341095e99 |
comparison
equal
deleted
inserted
replaced
57:11fcae12db20 | 58:63f7286e5d13 |
---|---|
1131 if not _G.IsTradeskillTrainer() then | 1131 if not _G.IsTradeskillTrainer() then |
1132 return | 1132 return |
1133 end | 1133 end |
1134 local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("target")) | 1134 local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("target")) |
1135 local npc = NPCEntry(unit_idnum) | 1135 local npc = NPCEntry(unit_idnum) |
1136 | |
1137 if not npc then | |
1138 return | |
1139 end | |
1136 npc.teaches = npc.teaches or {} | 1140 npc.teaches = npc.teaches or {} |
1137 | 1141 |
1138 -- Get the initial trainer filters | 1142 -- Get the initial trainer filters |
1139 local available = _G.GetTrainerServiceTypeFilter("available") | 1143 local available = _G.GetTrainerServiceTypeFilter("available") |
1140 local unavailable = _G.GetTrainerServiceTypeFilter("unavailable") | 1144 local unavailable = _G.GetTrainerServiceTypeFilter("unavailable") |