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.
pull/5028/head
poire-z 5 years ago committed by Frans de Jonge
parent eaeb3ec97f
commit eace8d25c1

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

Loading…
Cancel
Save