mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
#6767 fix the crash when given language is not supported
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34656 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
88fa080978
commit
94c113d24f
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user