diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index a0d2dd9157..2917c634c1 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -109,6 +109,13 @@ wxAppConsole::wxAppConsole() #ifdef __WXDEBUG__ SetTraceMasks(); +#if wxUSE_UNICODE + // In unicode mode the SetTraceMasks call can cause an apptraits to be + // created, but since we are still in the constructor the wrong kind will + // be created for GUI apps. Destroy it so it can be created again later. + delete m_traits; + m_traits = NULL; +#endif #endif }