From b89cac6761e9ab48e1b6149a0da90d47baf6f925 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 22 Oct 2017 20:24:58 +0200 Subject: [PATCH] Don't X error in SDL_CreateWindow with unsupported GL attributes --- src/video/x11/SDL_x11opengl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }