Guard against null pointers in QMessageLogContext

This commit is contained in:
Bill Somerville 2020-10-03 04:06:04 +01:00
parent bf5af3e5e4
commit 6f826a2a44
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
1 changed files with 4 additions and 4 deletions

View File

@ -222,16 +222,16 @@ void WSJTXLogging::qt_log_handler (QtMsgType type, QMessageLogContext const& con
{
BOOST_LOG_SEV (log, severity)
<< boost::log::add_value ("Line", context.line)
<< boost::log::add_value ("File", context.file)
<< boost::log::add_value ("Function", context.function)
<< boost::log::add_value ("File", file)
<< boost::log::add_value ("Function", function)
<< msg.toStdString ();
}
else
{
BOOST_LOG_CHANNEL_SEV (log, std::string {context.category}, severity)
<< boost::log::add_value ("Line", context.line)
<< boost::log::add_value ("File", context.file)
<< boost::log::add_value ("Function", context.function)
<< boost::log::add_value ("File", file)
<< boost::log::add_value ("Function", function)
<< msg.toStdString ();
}
if (QtFatalMsg == type)