Index: base/file_util.cc |
diff --git a/base/file_util.cc b/base/file_util.cc |
index 79921ff3fc1a1839a378bb76eec16276e12ff72e..5bc73cef08161eb9576dfad8aa73c2dad000196a 100644 |
--- a/base/file_util.cc |
+++ b/base/file_util.cc |
@@ -186,7 +186,8 @@ bool ReadFileToString(const FilePath& path, std::string* contents) { |
char buf[1 << 16]; |
size_t len; |
while ((len = fread(buf, 1, sizeof(buf), file)) > 0) { |
- contents->append(buf, len); |
+ if (contents) |
jorlow
2010/05/19 10:41:50
This feels dirty to me. I understand what you're
Mark Mentovai
2010/05/19 14:00:27
This does not feel dirty to me at all.
|
+ contents->append(buf, len); |
} |
CloseFile(file); |