mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
CoverBrowser: avoid crash when indexing some cre documents (#3293)
This commit is contained in:
@@ -373,6 +373,9 @@ function BookInfoManager:extractBookInfo(filepath, cover_specs)
|
||||
local document = DocumentRegistry:openDocument(filepath)
|
||||
if document then
|
||||
if document.loadDocument then -- needed for crengine
|
||||
-- Setting a default font before loading document
|
||||
-- actually do prevent some crashes
|
||||
document:setFontFace(document.default_font)
|
||||
document:loadDocument()
|
||||
-- Not needed for getting props:
|
||||
-- document:render()
|
||||
|
||||
Reference in New Issue
Block a user