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:
1 parent
c63a358e60
commit
5c20f84545
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user