Index: base/files/file_win.cc |
diff --git a/base/files/file_win.cc b/base/files/file_win.cc |
index 80f46136c7acacc0ccca1a0763b363d18107097d..3581fca723077d7bc72822c937da5e3d647d7ebd 100644 |
--- a/base/files/file_win.cc |
+++ b/base/files/file_win.cc |
@@ -104,8 +104,10 @@ PlatformFile File::TakePlatformFile() { |
} |
void File::Close() { |
- base::ThreadRestrictions::AssertIOAllowed(); |
- file_.Close(); |
+ if (file_.IsValid()) { |
+ base::ThreadRestrictions::AssertIOAllowed(); |
+ file_.Close(); |
+ } |
} |
int64 File::Seek(Whence whence, int64 offset) { |