Fix a few possible crashes
- TextWidget: avoid crash with small max_width (could happen
when opening menu on a small emulator window)
- TextWidget: avoid crash if re-used after :free()
- ReaderHighlight:clear(): fix possible crash when
scheduled and run after document closed
- DictQuickLookup: minor canSearch() tweak ('selected_text'
is normally available only on multiple words selection,
but is currently available on single word selection thanks
to some unrelated side effect)
This commit is contained in:
1 parent
067ece7281
commit
001d48f6cc
3 files changed
+9
-3
No files matched your search
@@ -379,6 +379,10 @@ function ReaderHighlight:clear(clear_id)
|
||||
end
|
||||
end
|
||||
self.clear_id = nil -- invalidate id
|
||||
if not self.ui.document then
|
||||
-- might happen if scheduled and run after document is closed
|
||||
return
|
||||
end
|
||||
if self.ui.document.info.has_pages then
|
||||
self.view.highlight.temp = {}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user