Browse Source

check for null pointer

pull/509/merge
orignal 9 years ago
parent
commit
6a453bcc8a
  1. 3
      Log.cpp

3
Log.cpp

@ -56,7 +56,7 @@ namespace log {
#endif #endif
case eLogFile: case eLogFile:
case eLogStream: case eLogStream:
m_LogStream->flush(); if (m_LogStream) m_LogStream->flush();
break; break;
default: default:
/* do nothing */ /* do nothing */
@ -107,6 +107,7 @@ namespace log {
#endif #endif
case eLogFile: case eLogFile:
case eLogStream: case eLogStream:
if (m_LogStream)
*m_LogStream << TimeAsString(msg->timestamp) *m_LogStream << TimeAsString(msg->timestamp)
<< "@" << short_tid << "@" << short_tid
<< "/" << g_LogLevelStr[msg->level] << "/" << g_LogLevelStr[msg->level]

Loading…
Cancel
Save