summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorsidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 17:14:45 +0000
committersidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 17:14:45 +0000
commita1a19501e82ec6f5a78865901c08448db34ac3f2 (patch)
tree1977c531dc2b9302af0729afe929bfee70ff3729 /base
parent1f3c7dd66d07bc26ea2558b4864b1d05a2dd75ae (diff)
downloadchromium_src-a1a19501e82ec6f5a78865901c08448db34ac3f2.zip
chromium_src-a1a19501e82ec6f5a78865901c08448db34ac3f2.tar.gz
chromium_src-a1a19501e82ec6f5a78865901c08448db34ac3f2.tar.bz2
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
Diffstat (limited to 'base')
-rw-r--r--base/file_util.cc2
1 files changed, 2 insertions, 0 deletions
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 GetFileSize(const std::wstring& file_path, int64* file_size) {
}
bool CloseFile(FILE* file) {
+ if (file == NULL)
+ return true;
return fclose(file) == 0;
}