if ( !theme )
{
wxLogError(_("Unsupported theme '%s'."), themeName.c_str());
-
return FALSE;
}
if ( wxSscanf(modeDesc.c_str(), _T("%ux%u-%u"), &w, &h, &bpp) != 3 )
{
wxLogError(_("Invalid display mode specification '%s'."), modeDesc.c_str());
-
return FALSE;
}
wxStrcat(szBuf, wxT("."));
}
+#if wxUSE_THREADS
+ // if we are not in the main thread,
+ // output the assert directly and trap since dialogs cannot be displayed
+ if (!wxThread::IsMain()) {
+ wxStrcat(szBuf, wxT(" [in child thread]"));
+#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
+ wxStrcat(szBuf, wxT("\r\n"));
+ OutputDebugString(szBuf);
+#else
+ // send to stderr
+ wxFprintf(stderr, wxT("%s\n"), szBuf);
+ fflush(stderr);
+#endif
+ // He-e-e-e-elp!! we're asserting in a child thread
+ wxTrap();
+ }
+#endif // wxUSE_THREADS
+
if ( !s_bNoAsserts )
{
// send it to the normal log destination