Check for non-empty string before writing to logger (fixes issue #2825)
This commit is contained in:
parent
1c88c74f86
commit
a94dc6a058
|
@ -256,10 +256,12 @@ ErrnoLogMessage::~ErrnoLogMessage() {
|
|||
} // namespace cef
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) {
|
||||
cef_string_utf8_t str = {0};
|
||||
std::wstring tmp_str(wstr);
|
||||
if (!tmp_str.empty()) {
|
||||
cef_string_utf8_t str = {0};
|
||||
cef_string_wide_to_utf8(wstr, tmp_str.size(), &str);
|
||||
out << str.str;
|
||||
cef_string_utf8_clear(&str);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue