From 21809adba021ffdfef34ec5d39ae63bfb978f51a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 1 Jun 2020 16:31:27 +0200 Subject: [PATCH] FIRE-29649: Crash when opening spellcheck settings --- indra/llui/llspellcheck.cpp | 10 +++++++++- indra/llui/llspellcheck.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index 990e651853..63a86fc0b2 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -50,7 +50,7 @@ LLSpellChecker::LLSpellChecker() : mHunspell(NULL) { // Load initial dictionary information - refreshDictionaryMap(); + //refreshDictionaryMap(); // FIRE-29649: Crash when opening spellcheck settings } LLSpellChecker::~LLSpellChecker() @@ -58,6 +58,14 @@ LLSpellChecker::~LLSpellChecker() delete mHunspell; } +// FIRE-29649: Crash when opening spellcheck settings +void LLSpellChecker::initSingleton() +{ + // Load initial dictionary information + refreshDictionaryMap(); +} +// + bool LLSpellChecker::checkSpelling(const std::string& word) const { if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word.c_str())) ) diff --git a/indra/llui/llspellcheck.h b/indra/llui/llspellcheck.h index f1964cc091..36628780a3 100644 --- a/indra/llui/llspellcheck.h +++ b/indra/llui/llspellcheck.h @@ -47,6 +47,7 @@ public: protected: void addToDictFile(const std::string& dict_path, const std::string& word); void initHunspell(const std::string& dict_language); + void initSingleton(); // FIRE-29649: Crash when opening spellcheck settings public: typedef std::list dict_list_t;