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:
parent
3100af8eef
commit
9d97e4e7cc
1 changed files with 1 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue