Mercurial > wow > wowdb-profiler
diff Main.lua @ 227:3dd05b29bc6f 1.0.38
Make sure the NPC entry is non-nil before attempting to set its metatable.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Tue, 29 Jan 2013 17:45:24 -0600 |
parents | 86b3d5b00a90 |
children | 25bfbe8b4826 |
line wrap: on
line diff
--- a/Main.lua Mon Jan 28 18:36:39 2013 -0600 +++ b/Main.lua Tue Jan 29 17:45:24 2013 -0600 @@ -333,12 +333,12 @@ } function NPCEntry(identifier) - local npc = _G.setmetatable(DBEntry("npcs", identifier), npc_meta) + local npc = DBEntry("npcs", identifier) if not npc then return end - return npc + return _G.setmetatable(npc, npc_meta) end function npc_prototype:EncounterData()