From 8cea1b986ee2b88b8a0ed42d012d6f92e4e85777 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 21 Jun 2015 19:37:37 +0200 Subject: [PATCH] Windows: Fixed crash if initialization of EGL failed but was tried again later. --- src/video/windows/SDL_windowsopengles.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/windows/SDL_windowsopengles.c b/src/video/windows/SDL_windowsopengles.c index 5833ec30d9954..9125da0e4f103 100644 --- a/src/video/windows/SDL_windowsopengles.c +++ b/src/video/windows/SDL_windowsopengles.c @@ -111,6 +111,7 @@ WIN_GLES_SetupWindow(_THIS, SDL_Window * window) if (_this->egl_data == NULL) { if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY) < 0) { + SDL_EGL_UnloadLibrary(_this); return -1; } }