Fontlist: really ignore invalid fonts

collectFaceInfo() can return an empty table {},
which could cause readerfont.lua's onSetFont()
to crash.
This commit is contained in:
poire-z
2025-10-17 22:26:52 +02:00
parent c63a358e60
commit 5c20f84545

View File

@@ -155,7 +155,7 @@ function FontList:_readList(dir, mark)
return
end
local fi = collectFaceInfo(path)
if not fi then return end
if not fi or not next(fi) then return end
fi.change = attr.change
self.fontinfo[path] = fi
mark.cache_dirty = true