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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user