protected call of mupdf.renderImage
This commit is contained in:
1 parent
30c3bc53c9
commit
2ff12af50c
1 file changed
+5
-3
@@ -148,9 +148,11 @@ function CreDocument:getCoverPageImage()
|
||||
local data, size = self._document:getCoverPageImageData()
|
||||
if data and size then
|
||||
local Mupdf = require("ffi/mupdf")
|
||||
local image = Mupdf.renderImage(data, size)
|
||||
ffi.C.free(data)
|
||||
return image
|
||||
local ok, image = pcall(Mupdf.renderImage, data, size)
|
||||
if ok then
|
||||
ffi.C.free(data)
|
||||
return image
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user