mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
languagesupport: check that ui.languagesupport is non-nil
Now that FileManager registers its UI modules in the same way as Reader, this shouldn't be necessary but this protects us against some other app creating a ReaderDictionary instance without having ui.languagesupport registered properly. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
@@ -801,7 +801,7 @@ end
|
||||
function ReaderDictionary:startSdcv(word, dict_names, fuzzy_search)
|
||||
local words = {word}
|
||||
|
||||
if self.ui.languagesupport:hasActiveLanguagePlugins() then
|
||||
if self.ui.languagesupport and self.ui.languagesupport:hasActiveLanguagePlugins() then
|
||||
-- Get any other candidates from any language-specific plugins we have.
|
||||
-- We prefer the originally selected word first (in case there is a
|
||||
-- dictionary entry for whatever text the user selected).
|
||||
|
||||
Reference in New Issue
Block a user