cre: fix possible crash when switching books too fast

Noticable with "End of document action > Open next file",
and holding PgDn in a directory full of single page html
files.
This commit is contained in:
poire-z
2019-05-09 13:11:29 +02:00
committed by Frans de Jonge
parent eaeb3ec97f
commit eace8d25c1

View File

@@ -220,7 +220,7 @@ function ReaderRolling:onCloseDocument()
end
function ReaderRolling:onCheckDomStyleCoherence()
if self.ui.document:isBuiltDomStale() then
if self.ui.document and self.ui.document:isBuiltDomStale() then
UIManager:show(ConfirmBox:new{
text = _("Styles have changed in such a way that fully reloading the document may be needed for a correct rendering.\nDo you want to reload the document?"),
ok_callback = function()