# HG changeset patch # User James D. Callahan III # Date 1359503124 21600 # Node ID 3dd05b29bc6ffd4322205ff89fb9988755d4746b # Parent 7471bca69c99e208ea526da66c99957ed15ea102 Make sure the NPC entry is non-nil before attempting to set its metatable. diff -r 7471bca69c99 -r 3dd05b29bc6f Main.lua --- 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()