summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/spellchecker.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/spellchecker.cc b/chrome/browser/spellchecker.cc
index d5a8a6c..e6cfc75 100644
--- a/chrome/browser/spellchecker.cc
+++ b/chrome/browser/spellchecker.cc
@@ -510,7 +510,8 @@ class AddWordToCustomDictionaryTask : public Task {
// or not.
word_ += "\n";
FILE* f = file_util::OpenFile(file_name_, "a+");
- fputs(word_.c_str(), f);
+ if (f != NULL)
+ fputs(word_.c_str(), f);
file_util::CloseFile(f);
}