ReaderHighlight: Don't try to close a non-existent widget in onClose

This commit is contained in:
NiLuJe
2024-01-15 02:34:58 +01:00
parent c529c1cce3
commit 5bd78ab3b4

View File

@@ -2208,8 +2208,10 @@ function ReaderHighlight:onSaveSettings()
end
function ReaderHighlight:onClose()
UIManager:close(self.highlight_dialog)
self.highlight_dialog = nil
if self.highlight_dialog then
UIManager:close(self.highlight_dialog)
self.highlight_dialog = nil
end
-- clear highlighted text
self:clear()
end