diff --git a/otk/display.cc b/otk/display.cc index b6fcab07..37203643 100644 --- a/otk/display.cc +++ b/otk/display.cc @@ -54,8 +54,10 @@ int OBDisplay::xerrorHandler(Display *d, XErrorEvent *e) #ifdef DEBUG char errtxt[128]; - XGetErrorText(d, e->error_code, errtxt, 128); - printf("X Error: %s\n", errtxt); + if (e->error_code != BadWindow) { + XGetErrorText(d, e->error_code, errtxt, 128); + printf("X Error: %s\n", errtxt); + } #else (void)d; (void)e;