+ if (!wxTheApp)
+ return TRUE;
+
+#ifdef __WXDEBUG__
+ if ( wxTheApp->IsInAssert() )
+ {
+ // don't generate the idle events while the assert modal dialog is
+ // shown, this completely confuses the apps which don't expect to be
+ // reentered from some safely-looking functions
+ return FALSE;
+ }
+#endif // __WXDEBUG__