changeset 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
files Main.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Main.lua	Tue Jul 03 19:44:41 2012 -0500
+++ b/Main.lua	Tue Jul 03 20:25:17 2012 -0500
@@ -1133,6 +1133,10 @@
     end
     local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("target"))
     local npc = NPCEntry(unit_idnum)
+
+    if not npc then
+        return
+    end
     npc.teaches = npc.teaches or {}
 
     -- Get the initial trainer filters