Fix crash in destructor of spellchecked input field.

This commit is contained in:
John Preston 2019-11-05 17:03:48 +03:00
parent b94ed1fc3b
commit d1e2fec760
1 changed files with 2 additions and 2 deletions

View File

@ -278,8 +278,8 @@ void InitSpellchecker(
not_null<Main::Session*> session,
not_null<Ui::InputField*> field) {
#ifndef TDESKTOP_DISABLE_SPELLCHECK
const auto s = field->lifetime().make_state<Spellchecker::SpellingHighlighter>(
field->rawTextEdit(),
const auto s = Ui::CreateChild<Spellchecker::SpellingHighlighter>(
field->rawTextEdit().get(),
session->settings().spellcheckerEnabledValue(),
field->documentContentsChanges());
Spellchecker::SetPhrases({ {