mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 05:36:59 -04:00
Fix crash.
This commit is contained in:
@@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------- : Includes
|
// ----------------------------------------------------------------------------- : Includes
|
||||||
|
|
||||||
#include <util/prec.hpp>
|
#include <util/prec.hpp>
|
||||||
#include <util/spell_checker.hpp>
|
#include <util/spell_checker.hpp>
|
||||||
#include <util/string.hpp>
|
#include <util/string.hpp>
|
||||||
#include <util/io/package_manager.hpp>
|
#include <util/io/package_manager.hpp>
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------- : Spell checker : construction
|
// ----------------------------------------------------------------------------- : Spell checker : construction
|
||||||
@@ -96,7 +96,7 @@ bool SpellChecker::convert_encoding(const String& word, CharBuffer& out) {
|
|||||||
}
|
}
|
||||||
// convert encoding
|
// convert encoding
|
||||||
out = fixed.mb_str(encoding);
|
out = fixed.mb_str(encoding);
|
||||||
if (*out == '\0') {
|
if (!out || *out == '\0') {
|
||||||
// If encoding fails we get an empty string, since the word was not empty this can never happen
|
// If encoding fails we get an empty string, since the word was not empty this can never happen
|
||||||
// words that can't be encoded are not in the dictionary, so they are wrong.
|
// words that can't be encoded are not in the dictionary, so they are wrong.
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user