Don't X error in SDL_CreateWindow with unsupported GL attributes release-2.0.7
authorSven Hesse <drmccoy@drmccoy.de>
Sun, 22 Oct 2017 20:24:58 +0200
changeset 116452088cd828335
parent 11644 05ff2be7e0d5
child 11646 c875be618b90
Don't X error in SDL_CreateWindow with unsupported GL attributes
src/video/x11/SDL_x11opengl.c
     1.1 --- a/src/video/x11/SDL_x11opengl.c	Sat Oct 21 22:26:24 2017 -0700
     1.2 +++ b/src/video/x11/SDL_x11opengl.c	Sun Oct 22 20:24:58 2017 +0200
     1.3 @@ -463,7 +463,9 @@
     1.4          }
     1.5      }
     1.6  
     1.7 -    X11_XDestroyWindow(display, w);
     1.8 +    if (w) {
     1.9 +        X11_XDestroyWindow(display, w);
    1.10 +    }
    1.11      X11_PumpEvents(_this);
    1.12  }
    1.13