summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SpellChecker')
-rw-r--r--plugins/SpellChecker/src/dictionary.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp
index 30ab2b499a..e12c7d7d47 100644
--- a/plugins/SpellChecker/src/dictionary.cpp
+++ b/plugins/SpellChecker/src/dictionary.cpp
@@ -428,13 +428,12 @@ protected:
return ret;
}
- wchar_t* fromHunspellAndFree(char *hunspellWord)
+ wchar_t* fromHunspellAndFree(std::string hunspellWord)
{
- if (hunspellWord == nullptr)
+ if (hunspellWord.c_str() == nullptr)
return nullptr;
- wchar_t *ret = fromHunspell(hunspellWord);
- free(hunspellWord);
+ wchar_t *ret = fromHunspell(hunspellWord.c_str());
return ret;
}