From 5c20f8454514072a3d0436798d22a5f48448f529 Mon Sep 17 00:00:00 2001 From: poire-z Date: Fri, 17 Oct 2025 22:26:52 +0200 Subject: [PATCH] Fontlist: really ignore invalid fonts collectFaceInfo() can return an empty table {}, which could cause readerfont.lua's onSetFont() to crash. --- frontend/fontlist.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/fontlist.lua b/frontend/fontlist.lua index 9b06a3714..79b19a23e 100644 --- a/frontend/fontlist.lua +++ b/frontend/fontlist.lua @@ -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