From 466f1e725127b75f78a729e5e152560b60e0dbf0 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Tue, 7 Oct 2014 23:49:56 +0200 Subject: [PATCH] fix --- game/engines/default/engine/utils.lua | 1 + game/modules/tome/class/interface/PartyLore.lua | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/game/engines/default/engine/utils.lua b/game/engines/default/engine/utils.lua index a03aea0daf..f6b2fb7b8b 100644 --- a/game/engines/default/engine/utils.lua +++ b/game/engines/default/engine/utils.lua @@ -2334,6 +2334,7 @@ function util.removeForceSafeBoot() end -- Alias os.exit to our own exit method for cleanliness +os.crash = os.exit os.exit = core.game.exit_engine -- Ultra weird, this is used by the C serialization code because I'm too dumb to make lua_dump() work on windows ... diff --git a/game/modules/tome/class/interface/PartyLore.lua b/game/modules/tome/class/interface/PartyLore.lua index 21aadb85f4..8823555ebb 100644 --- a/game/modules/tome/class/interface/PartyLore.lua +++ b/game/modules/tome/class/interface/PartyLore.lua @@ -66,7 +66,9 @@ function _M:getLore(lore, silent) self.lore_known = self.lore_known or {} self.additional_lore = self.additional_lore or {} if not silent then assert(self.lore_defs[lore] or self.additional_lore[lore], "bad lore id "..lore) end - local l = table.clone(self.lore_defs[lore] or self.additional_lore[lore]) + local l = self.lore_defs[lore] or self.additional_lore[lore] + if not l then return end + l = table.clone(l) if l.template then local tpl = slt2.loadstring(l.lore) -- GitLab