From eace8d25c1cbf9bd13e98220098494e8fb63c18f Mon Sep 17 00:00:00 2001 From: poire-z Date: Thu, 9 May 2019 13:11:29 +0200 Subject: [PATCH] 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. --- frontend/apps/reader/modules/readerrolling.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerrolling.lua b/frontend/apps/reader/modules/readerrolling.lua index a6dc1d264..7228aeda0 100644 --- a/frontend/apps/reader/modules/readerrolling.lua +++ b/frontend/apps/reader/modules/readerrolling.lua @@ -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()