Fixed Spelling Highlighter creation on unsupported platforms.

This commit is contained in:
23rd 2019-12-30 14:02:50 +03:00 committed by John Preston
parent 1ee7801c0b
commit e5682a9b25

View File

@ -278,6 +278,9 @@ void InitSpellchecker(
not_null<Main::Session*> session,
not_null<Ui::InputField*> field) {
#ifndef TDESKTOP_DISABLE_SPELLCHECK
if (!Platform::Spellchecker::IsAvailable()) {
return;
}
const auto s = Ui::CreateChild<Spellchecker::SpellingHighlighter>(
field.get(),
session->settings().spellcheckerEnabledValue());