mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-07 03:34:15 +00:00
check for null pointer
This commit is contained in:
parent
5a2c4919c6
commit
6a453bcc8a
11
Log.cpp
11
Log.cpp
@ -56,7 +56,7 @@ namespace log {
|
||||
#endif
|
||||
case eLogFile:
|
||||
case eLogStream:
|
||||
m_LogStream->flush();
|
||||
if (m_LogStream) m_LogStream->flush();
|
||||
break;
|
||||
default:
|
||||
/* do nothing */
|
||||
@ -107,10 +107,11 @@ namespace log {
|
||||
#endif
|
||||
case eLogFile:
|
||||
case eLogStream:
|
||||
*m_LogStream << TimeAsString(msg->timestamp)
|
||||
<< "@" << short_tid
|
||||
<< "/" << g_LogLevelStr[msg->level]
|
||||
<< " - " << msg->text << std::endl;
|
||||
if (m_LogStream)
|
||||
*m_LogStream << TimeAsString(msg->timestamp)
|
||||
<< "@" << short_tid
|
||||
<< "/" << g_LogLevelStr[msg->level]
|
||||
<< " - " << msg->text << std::endl;
|
||||
break;
|
||||
case eLogStdout:
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user