[go: nahoru, domu]

Fix another crasher in Spell Checker related to file IO.
Issue=3039
Review URL: http://codereview.chromium.org/7528

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3659 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/file_util.cc b/base/file_util.cc
index 09f8249..49f063e 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -295,6 +295,8 @@
 }
 
 bool CloseFile(FILE* file) {
+  if (file == NULL)
+    return true;
   return fclose(file) == 0;
 }