Windows: Fixed crash if initialization of EGL failed but was tried again later.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sun, 21 Jun 2015 19:37:37 +0200
changeset 9773 dad226bc43a5
parent 9772 ef27c10db4bf
child 9774 3478d2a45b31
Windows: Fixed crash if initialization of EGL failed but was tried again later.
src/video/windows/SDL_windowsopengles.c
--- a/src/video/windows/SDL_windowsopengles.c	Sun Jun 21 19:36:35 2015 +0200
+++ b/src/video/windows/SDL_windowsopengles.c	Sun Jun 21 19:37:37 2015 +0200
@@ -111,6 +111,7 @@
 
     if (_this->egl_data == NULL) {
         if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY) < 0) {
+            SDL_EGL_UnloadLibrary(_this);
             return -1;
         }
     }