summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse <drmccoy@drmccoy.de>2017-10-22 20:24:58 +0200
committerSven Hesse <drmccoy@drmccoy.de>2017-10-22 20:24:58 +0200
commit5f878b590d1fe7a762524824f133475961efe295 (patch)
tree544dbce16bb67da28ae6d7c5147f7ea90df8e296
parent2931bf8a19d5d778079371d4cdf7a82355d177af (diff)
downloadsdl-release-2.0.7.tar.gz
Don't X error in SDL_CreateWindow with unsupported GL attributesrelease-2.0.7
-rw-r--r--src/video/x11/SDL_x11opengl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c
index ab1bf58ca..922c09617 100644
--- a/src/video/x11/SDL_x11opengl.c
+++ b/src/video/x11/SDL_x11opengl.c
@@ -463,7 +463,9 @@ X11_GL_InitExtensions(_THIS)
}
}
- X11_XDestroyWindow(display, w);
+ if (w) {
+ X11_XDestroyWindow(display, w);
+ }
X11_PumpEvents(_this);
}