Преглед изворни кода

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

Philipp Wiesemann пре 10 година
родитељ
комит
8cea1b986e
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      src/video/windows/SDL_windowsopengles.c

+ 1 - 0
src/video/windows/SDL_windowsopengles.c

@@ -111,6 +111,7 @@ WIN_GLES_SetupWindow(_THIS, SDL_Window * window)
 
 
     if (_this->egl_data == NULL) {
     if (_this->egl_data == NULL) {
         if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY) < 0) {
         if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY) < 0) {
+            SDL_EGL_UnloadLibrary(_this);
             return -1;
             return -1;
         }
         }
     }
     }