#6767 fix another crash in hasDictionary

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34670 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stephan Witt 2010-06-15 08:35:41 +00:00
parent 8757a62f88
commit 32dc99100a

View File

@ -224,7 +224,7 @@ AspellSpeller * AspellChecker::Private::addSpeller(string const & lang,
}
spellers_[spellerID(lang, variety)] = m;
return 0 == m.config ? 0 : to_aspell_speller(m.e_speller);
return m.e_speller ? to_aspell_speller(m.e_speller) : 0;
}
@ -338,7 +338,7 @@ bool AspellChecker::hasDictionary(Language const * lang) const
if (lang) {
for (; it != end && !have; ++it) {
have = d->isValidDictionary(it->second.config, lang->code(), lang->variety());
have = it->second.config && d->isValidDictionary(it->second.config, lang->code(), lang->variety());
}
if (!have) {
AspellConfig * config = d->getConfig(lang->code(), lang->variety());