diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index 8dbe8d82c..f16d78d6c 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -637,7 +637,6 @@ X11_CreateWindow(_THIS, SDL_Window * window) ) { #if SDL_VIDEO_OPENGL_EGL if (!_this->egl_data) { - X11_XDestroyWindow(display, w); return -1; } @@ -645,7 +644,6 @@ X11_CreateWindow(_THIS, SDL_Window * window) windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) w); if (windowdata->egl_surface == EGL_NO_SURFACE) { - X11_XDestroyWindow(display, w); return SDL_SetError("Could not create GLES window surface"); } #else