Don't use invalid static_cast<> in wxAppConsoleBase ctor

Although the object being created _will_ be of type wxAppConsole, it
doesn't have this type yet, as wxAppConsole ctor hadn't yet run, and so
the static cast is invalid and detected as such by UBSAN in g++ 6.3.
This commit is contained in:
Vadim Zeitlin 2017-11-28 22:39:24 +01:00
parent 3100af8eef
commit 9d97e4e7cc

View File

@ -173,7 +173,7 @@ wxAppConsoleBase::wxAppConsoleBase()
m_mainLoop = NULL;
m_bDoPendingEventProcessing = true;
ms_appInstance = static_cast<wxAppConsole *>(this);
ms_appInstance = reinterpret_cast<wxAppConsole *>(this);
#ifdef __WXDEBUG__
SetTraceMasks();