aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow')
-rw-r--r--src/nativewindow/native/x11/Xmisc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c
index a0aa27e13..cc0b1a1ef 100644
--- a/src/nativewindow/native/x11/Xmisc.c
+++ b/src/nativewindow/native/x11/Xmisc.c
@@ -170,15 +170,14 @@ static int errorHandlerQuiet = 0 ;
static int x11ErrorHandler(Display *dpy, XErrorEvent *e)
{
- const char * errStr = strerror(errno);
-
- fprintf(stderr, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s\n", dpy, e->error_code, errStr);
- fflush(stderr);
-
if(!errorHandlerQuiet) {
JNIEnv *curEnv = NULL;
JNIEnv *newEnv = NULL;
int envRes ;
+ const char * errStr = strerror(errno);
+
+ fprintf(stderr, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s\n", dpy, e->error_code, errStr);
+ fflush(stderr);
// retrieve this thread's JNIEnv curEnv - or detect it's detached
envRes = (*jvmHandle)->GetEnv(jvmHandle, (void **) &curEnv, jvmVersion) ;