From 32dc99100af23ae7f81c992330cedae2c83a0ba1 Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Tue, 15 Jun 2010 08:35:41 +0000 Subject: [PATCH] #6767 fix another crash in hasDictionary git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34670 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/AspellChecker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AspellChecker.cpp b/src/AspellChecker.cpp index 77c4b5bc85..097ec69165 100644 --- a/src/AspellChecker.cpp +++ b/src/AspellChecker.cpp @@ -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());