fix lua logging when lua gives a null string

This commit is contained in:
Chris Beck 2015-04-05 12:02:54 -04:00
parent 92052e1506
commit 53eac42935

View file

@ -78,16 +78,22 @@ protected:
{}
inline command_log & operator<< (const std::string & str) {
return *this << str.c_str();
}
inline command_log & operator<< (char const* str) {
log_ << str;
if (external_log_) {
(*external_log_) << str;
}
return *this;
}
inline command_log & operator<< (char const* str) {
if (str != NULL) {
log_ << str;
if (external_log_) {
(*external_log_) << str;
}
}
return *this;
}
};
command_log cmd_log_;