Fixed a crash on initialization

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-07-09 15:29:38 +00:00
parent d630f41d9b
commit 74039d33c7

View File

@@ -402,9 +402,11 @@ public:
virtual bool OnInit()
{
// Must be done before modules are initialized
#if 0
if( pipe(idleFds) != 0 )
return false;
#endif
return true;
}
@@ -468,8 +470,18 @@ void wxApp::WakeUpIdle()
::wxBreakDispatch();
}
bool wxInitIdleFds()
{
if( pipe(idleFds) != 0 )
return false;
return true;
}
bool wxAddIdleCallback()
{
if (!wxInitIdleFds())
return false;
// install input handler for wxWakeUpIdle
inputId = XtAppAddInput( (XtAppContext) wxTheApp->GetAppContext(),
idleFds[0],