Backed out changeset 4ad56dbf4a6f
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c
index 4461017..c7184bd 100644
--- a/src/video/SDL_egl.c
+++ b/src/video/SDL_egl.c
@@ -72,7 +72,6 @@
_this->egl_data->NAME = SDL_LoadFunction(_this->egl_data->dll_handle, #NAME); \
if (!_this->egl_data->NAME) \
{ \
- SDL_EGL_UnloadLibrary(_this); \
return SDL_SetError("Could not retrieve EGL function " #NAME); \
}
@@ -220,7 +219,6 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa
_this->egl_data->egl_dll_handle = egl_dll_handle;
if (egl_dll_handle == NULL) {
- SDL_EGL_UnloadLibrary(_this);
return SDL_SetError("Could not initialize OpenGL / GLES library");
}
@@ -242,7 +240,6 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa
if (dll_handle != NULL) {
SDL_UnloadObject(dll_handle);
}
- SDL_EGL_UnloadLibrary(_this);
return SDL_SetError("Could not load EGL library");
}
SDL_ClearError();
@@ -272,12 +269,10 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa
#if !defined(__WINRT__)
_this->egl_data->egl_display = _this->egl_data->eglGetDisplay(native_display);
if (!_this->egl_data->egl_display) {
- SDL_EGL_UnloadLibrary(_this);
return SDL_SetError("Could not get EGL display");
}
if (_this->egl_data->eglInitialize(_this->egl_data->egl_display, NULL, NULL) != EGL_TRUE) {
- SDL_EGL_UnloadLibrary(_this);
return SDL_SetError("Could not initialize EGL");
}
#endif