]> git.lyx.org Git - lyx.git/blobdiff - src/AspellChecker.cpp
Add an update parameter to BufferView::scrollToCursor and BufferView::scrollDocView...
[lyx.git] / src / AspellChecker.cpp
index 263e379c23b8e406d44b8b8e2936abf0685dbaea..77c4b5bc85c3343dc105f15f431b28768176b263 100644 (file)
@@ -217,10 +217,14 @@ AspellSpeller * AspellChecker::Private::addSpeller(string const & lang,
        if (aspell_error_number(m.e_speller) != 0) {
                // FIXME: We should indicate somehow that this language is not supported.
                LYXERR(Debug::FILES, "aspell error: " << aspell_error_message(m.e_speller));
+               delete_aspell_can_have_error(m.e_speller);
+               delete_aspell_config(m.config);
+               m.config = 0;
+               m.e_speller = 0;
        }
 
        spellers_[spellerID(lang, variety)] = m;
-       return to_aspell_speller(m.e_speller);
+       return 0 == m.config ? 0 : to_aspell_speller(m.e_speller);
 }