From c3e2159efa02485ded571ccb62b2bde80233150d Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Sat, 23 Apr 2016 20:39:34 +0900 Subject: [PATCH] ltj-jfont.lua: id.filename may be nil in luaotfload v2.7 --- src/ltj-jfont.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ltj-jfont.lua b/src/ltj-jfont.lua index 735d751..16ba9d9 100644 --- a/src/ltj-jfont.lua +++ b/src/ltj-jfont.lua @@ -781,8 +781,8 @@ do local checksum = file.checksum local function prepare_extra_data_base(id) - if not id then return end - local bname = file.nameonly(id.filename or '') + if (not id) or (not id.filename) then return end + local bname = file.nameonly(id.filename) if not font_extra_basename[bname] then -- if the cache is present, read it local newsum = checksum(id.filename) -- MD5 checksum of the fontfile @@ -809,7 +809,7 @@ do end end local function prepare_extra_data_font(id, res) - if type(res)=='table' and res.shared then + if type(res)=='table' and res.shared and res.filename then font_extra_info[id] = font_extra_basename[file.nameonly(res.filename)] end end -- 2.11.0