summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/spellchecker/spellcheck_custom_dictionary.cc')
-rw-r--r--chrome/browser/spellchecker/spellcheck_custom_dictionary.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
index 1d8ce84..b793b27 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -49,8 +49,10 @@ void SpellcheckCustomDictionary::LoadDictionaryIntoCustomWordList(
std::string contents;
file_util::ReadFileToString(custom_dictionary_path_, &contents);
- if (contents.empty())
+ if (contents.empty()) {
+ custom_words->clear();
return;
+ }
base::SplitString(contents, '\n', custom_words);
// Clear out empty words.