Browse Source

check for null pointer

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

11
Log.cpp

@ -56,7 +56,7 @@ namespace log { @@ -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 { @@ -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…
Cancel
Save