changeset 46:786292c0bcc8

Protection against nil in a couple of places.
author James D. Callahan III <jcallahan@curse.com>
date Wed, 20 Jun 2012 12:29:02 -0500
parents 5d5a490724ec
children 768c5f3587c2
files Main.lua
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Main.lua	Fri Jun 15 11:57:54 2012 -0500
+++ b/Main.lua	Wed Jun 20 12:29:02 2012 -0500
@@ -628,7 +628,11 @@
         end
         UpdateFactionData()
 
+        if not faction_name or not faction_standings[faction_name] then
+            return
+        end
         local npc = NPCEntry(action_data.identifier)
+
         if not npc then
             return
         end
@@ -1061,6 +1065,9 @@
     function WDP:QUEST_DETAIL()
         local quest = UpdateQuestJuncture("begin")
 
+        if not quest then
+            return
+        end
         quest.classes = quest.classes or {}
         quest.classes[PLAYER_CLASS] = true