diff --git a/game/engines/default/engine/utils.lua b/game/engines/default/engine/utils.lua index a03aea0dafaf7ced05dd7cf5f84e96a4afc4d7b1..f6b2fb7b8ba87c9f79905ac9b05275432a3586f5 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 21aadb85f4c5441ce3fd138cbafac803642ee7a0..8823555ebb05688bdf85d70b067d57e5cde79c1c 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)