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 {
#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,10 +107,11 @@ namespace log {
#endif #endif
case eLogFile: case eLogFile:
case eLogStream: case eLogStream:
*m_LogStream << TimeAsString(msg->timestamp) if (m_LogStream)
<< "@" << short_tid *m_LogStream << TimeAsString(msg->timestamp)
<< "/" << g_LogLevelStr[msg->level] << "@" << short_tid
<< " - " << msg->text << std::endl; << "/" << g_LogLevelStr[msg->level]
<< " - " << msg->text << std::endl;
break; break;
case eLogStdout: case eLogStdout:
default: default:

Loading…
Cancel
Save