mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
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:
@@ -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