Use wxSetAssertHandler() instead of changing wxTheAssertHandler
This commit is contained in:
parent
000ee22e39
commit
097f89dcbc
|
@ -65,15 +65,14 @@ public:
|
||||||
WX_QUIET()
|
WX_QUIET()
|
||||||
{
|
{
|
||||||
m_old_level = wxLog::GetLogLevel();
|
m_old_level = wxLog::GetLogLevel();
|
||||||
m_old_handler = wxTheAssertHandler;
|
m_old_handler = wxSetAssertHandler( nullptr );
|
||||||
wxTheAssertHandler = nullptr;
|
|
||||||
wxLog::SetLogLevel( wxLOG_FatalError );
|
wxLog::SetLogLevel( wxLOG_FatalError );
|
||||||
}
|
}
|
||||||
|
|
||||||
~WX_QUIET()
|
~WX_QUIET()
|
||||||
{
|
{
|
||||||
wxLog::SetLogLevel( m_old_level );
|
wxLog::SetLogLevel( m_old_level );
|
||||||
wxTheAssertHandler = m_old_handler;
|
wxSetAssertHandler( m_old_handler );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue