Commit c1dd2035 authored by jamesge's avatar jamesge

add a null check in ~LogPostfixDummy

parent ce7c45f1
...@@ -1541,7 +1541,9 @@ void Controller::FlushSessionKV(std::ostream& os) { ...@@ -1541,7 +1541,9 @@ void Controller::FlushSessionKV(std::ostream& os) {
} }
Controller::LogPostfixDummy::~LogPostfixDummy() { Controller::LogPostfixDummy::~LogPostfixDummy() {
if (osptr != nullptr) {
*osptr << postfix; *osptr << postfix;
}
} }
std::ostream& operator<<(std::ostream& os, const Controller::LogPostfixDummy& p) { std::ostream& operator<<(std::ostream& os, const Controller::LogPostfixDummy& p) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment