Update IIfADataCollection.lua

manavortex [04-04-18 - 10:23]
Update IIfADataCollection.lua

Even more paranoid exception catching
Filename
IIfA/IIfADataCollection.lua
diff --git a/IIfA/IIfADataCollection.lua b/IIfA/IIfADataCollection.lua
index 5a5aafc..09334d4 100644
--- a/IIfA/IIfADataCollection.lua
+++ b/IIfA/IIfADataCollection.lua
@@ -102,7 +102,9 @@ function IIfA:CollectGuildBank()
 			local slotIndex = ZO_GuildBankBackpack.data[i].data.slotIndex
 			local dbItem, itemKey = IIfA:EvalBagItem(BAG_GUILDBANK, slotIndex)
 			p("Collect guild bank from <<1>> - slot/key <<2>> / <<3>>", curGuild, slotIndex, itemKey)
+			if not IIfA.BagSlotInfo or not curGuild then return end -- be paranoid because this might happen in the middle of unloading
 			IIfA.BagSlotInfo[curGuild] = IIfA.BagSlotInfo[curGuild] or {}
+			if not IIfA.BagSlotInfo[curGuild] then return end  -- be paranoid because this might happen in the middle of unloading
 			IIfA.BagSlotInfo[curGuild][slotIndex] = itemKey
 		end
 	end)