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