diff --git a/utils/kicad-ogltest/kicad-ogltest.cpp b/utils/kicad-ogltest/kicad-ogltest.cpp index 7c3415f0c6..64bdf1d982 100644 --- a/utils/kicad-ogltest/kicad-ogltest.cpp +++ b/utils/kicad-ogltest/kicad-ogltest.cpp @@ -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 ); } };