Guard against nil values.
Johnny C. Lam [03-20-13 - 05:00]
Guard against nil values.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@804 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleGUID.lua b/OvaleGUID.lua
index 327ee5d..022e413 100644
--- a/OvaleGUID.lua
+++ b/OvaleGUID.lua
@@ -58,7 +58,7 @@ function OvaleGUID:Update(unitId)
local guid = API_UnitGUID(unitId)
local previousGuid = self_guid[unitId]
if previousGuid ~= guid then
- if previousGuid then
+ if previousGuid and self_unitId[previousGuid] then
self_unitId[previousGuid][unitId] = nil
if not next(self_unitId[previousGuid]) then
self_unitId[previousGuid] = nil