Because the wxConsoleAppTraits was being created for GUI apps
wxExecute would fail if the wxEXEC_ASYNC flags was used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26991
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#ifdef __WXDEBUG__
SetTraceMasks();
#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