Commit 8cea1b986ee2b88b8a0ed42d012d6f92e4e85777

Philipp Wiesemann 2015-06-21T19:37:37

Windows: Fixed crash if initialization of EGL failed but was tried again later.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/video/windows/SDL_windowsopengles.c b/src/video/windows/SDL_windowsopengles.c
index 5833ec3..9125da0 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;
         }
     }