From 097f89dcbc92e92cdaa22ce9d47c9b005f5a9670 Mon Sep 17 00:00:00 2001 From: Mathias Grimmberger Date: Tue, 2 May 2017 10:14:02 +0200 Subject: [PATCH] Use wxSetAssertHandler() instead of changing wxTheAssertHandler --- utils/kicad-ogltest/kicad-ogltest.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 ); } };