mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Fix hunspell suggestion call.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30930 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
354c436ae7
commit
697813c491
@ -160,15 +160,13 @@ void HunspellChecker::suggest(WordLangTuple const & wl,
|
||||
Hunspell * h = d->speller(wl.lang_code());
|
||||
if (!h)
|
||||
return;
|
||||
char *** suggestion_list = 0;
|
||||
|
||||
// FIXME: Hunspell::suggest() crashes on Win/MSVC9
|
||||
char ** suggestion_list;
|
||||
int const suggestion_number = h->suggest(&suggestion_list, word_to_check.c_str());
|
||||
if (suggestion_number <= 0)
|
||||
return;
|
||||
|
||||
int const suggestion_number = h->suggest(suggestion_list, word_to_check.c_str());
|
||||
if (suggestion_number == 0)
|
||||
return;
|
||||
h->free_list(suggestion_list, suggestion_number);
|
||||
for (int i = 0; i != suggestion_number; ++i)
|
||||
suggestions.push_back(from_utf8(suggestion_list[i]));
|
||||
h->free_list(&suggestion_list, suggestion_number);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user