CoverBrowser: avoid crash when indexing some cre documents (#3293)

This commit is contained in:
poire-z
2017-10-03 00:31:36 +02:00
committed by GitHub
parent 26def92983
commit b55265ba91

View File

@@ -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()