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

reviewable/pr11362/r2
NiLuJe 4 months ago
parent c529c1cce3
commit 5bd78ab3b4

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

Loading…
Cancel
Save