diff options
author | Sven Hesse <drmccoy@drmccoy.de> | 2017-10-22 20:24:58 +0200 |
---|---|---|
committer | Sven Hesse <drmccoy@drmccoy.de> | 2017-10-22 20:24:58 +0200 |
commit | 236c143dd467bc18464ce2bac1bea9a66bd25588 (patch) | |
tree | 27223740bb2dc1d2fac6a34d68a3a9fce57d312f /src/video/x11/SDL_x11opengl.c | |
parent | b9c2f1c58f1bffd5bb29963abce7df5232b42eee (diff) |
Don't X error in SDL_CreateWindow with unsupported GL attributes
Diffstat (limited to 'src/video/x11/SDL_x11opengl.c')
-rw-r--r-- | src/video/x11/SDL_x11opengl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c index ab1bf58ca1..922c096173 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); } |