mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 21:58:38 -05:00
Guard against null pointers in QMessageLogContext
This commit is contained in:
parent
bf5af3e5e4
commit
6f826a2a44
@ -222,16 +222,16 @@ void WSJTXLogging::qt_log_handler (QtMsgType type, QMessageLogContext const& con
|
|||||||
{
|
{
|
||||||
BOOST_LOG_SEV (log, severity)
|
BOOST_LOG_SEV (log, severity)
|
||||||
<< boost::log::add_value ("Line", context.line)
|
<< boost::log::add_value ("Line", context.line)
|
||||||
<< boost::log::add_value ("File", context.file)
|
<< boost::log::add_value ("File", file)
|
||||||
<< boost::log::add_value ("Function", context.function)
|
<< boost::log::add_value ("Function", function)
|
||||||
<< msg.toStdString ();
|
<< msg.toStdString ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BOOST_LOG_CHANNEL_SEV (log, std::string {context.category}, severity)
|
BOOST_LOG_CHANNEL_SEV (log, std::string {context.category}, severity)
|
||||||
<< boost::log::add_value ("Line", context.line)
|
<< boost::log::add_value ("Line", context.line)
|
||||||
<< boost::log::add_value ("File", context.file)
|
<< boost::log::add_value ("File", file)
|
||||||
<< boost::log::add_value ("Function", context.function)
|
<< boost::log::add_value ("Function", function)
|
||||||
<< msg.toStdString ();
|
<< msg.toStdString ();
|
||||||
}
|
}
|
||||||
if (QtFatalMsg == type)
|
if (QtFatalMsg == type)
|
||||||
|
Loading…
Reference in New Issue
Block a user