even more paranoid exception catching

manavortex [03-08-18 - 07:26]
even more paranoid exception catching
Filename
IIfA/IIfADataCollection.lua
diff --git a/IIfA/IIfADataCollection.lua b/IIfA/IIfADataCollection.lua
index 11c437b..5a5aafc 100644
--- a/IIfA/IIfADataCollection.lua
+++ b/IIfA/IIfADataCollection.lua
@@ -514,8 +514,8 @@ p("Adding loc=<<1>>, slot <<2>>, count=<<3>>", location, slotId, itemCount)
 		DBitem = DBv3[itemKey]
 	end

-	if DBitem.locations and DBitem.locations[location] and IIfA:TableCount(DBitem.locations[location].bagSlot) == 0 then
-p("Zapping location=<<1>>, bag=<<2>>, slot=<<3>>", location, bagId, slotId)
+	if nil ~= location and DBitem.locations and DBitem.locations[location] and IIfA:TableCount(DBitem.locations[location].bagSlot) == 0 then
+		p("Zapping location=<<1>>, bag=<<2>>, slot=<<3>>", location, bagId, slotId)
 		DBitem.locations[location] = nil
 	end