---
 e2app.cpp |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/e2app.cpp
+++ b/e2app.cpp
@@ -639,11 +639,17 @@ int e2App::LoadDriver(int start)
 
 static e2App e2_App(APPNAME " - " APPNAME_EXT);	// The instance of the app
 
+static XErrorHandler old_handler = (XErrorHandler) 0 ;
+
+static int ApplicationErrorHandler(Display *display, XErrorEvent *theEvent)
+{
+    return 0 ;
+}
+
 //============================>>> AppMain <<<==============================
 int AppMain(int argc, char** argv)
 {
 	char str[MAXPATH];
-
 #ifdef	__unix__
 	char *sp;
 
@@ -656,6 +662,7 @@ int AppMain(int argc, char** argv)
 	strcat(str, "." APPNAME "rc");
 	str[MAXPATH-1] = '\0';
 	e2_App.SetFileName(str);
+	XSetErrorHandler(ApplicationErrorHandler) ;
 #else
 	//The profile file is called "ponyprog.ini"
 	//while the help file "ponyprog.html"
