Chromium Code Reviews| Index: base/logging.cc |
| diff --git a/base/logging.cc b/base/logging.cc |
| index 9ad50e8d9934d8f941aafae0083174bd53f9ebba..8ff226082e60b2fbd9999329bd0dccc5ca3b1d60 100644 |
| --- a/base/logging.cc |
| +++ b/base/logging.cc |
| @@ -862,7 +862,7 @@ void CloseLogFile() { |
| } |
| void RawLog(int level, const char* message) { |
| - if (level >= g_min_log_level) { |
| + if (level >= g_min_log_level && message) { |
| size_t bytes_written = 0; |
| const size_t message_len = strlen(message); |
| int rv; |
| @@ -915,5 +915,5 @@ BASE_EXPORT void LogErrorNotReached(const char* file, int line) { |
| } // namespace logging |
| std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) { |
| - return out << base::WideToUTF8(wstr); |
| + return out << (wstr ? base::WideToUTF8(wstr) : std::string()); |
|
Mark Mentovai
2016/03/10 18:06:54
Your description only mentions RawLog(). Make it a
|
| } |