mirror of
https://github.com/yawut/SDL.git
synced 2026-08-20 07:44:03 -05:00
Don't crash if loading the OpenGL library fails
This commit is contained in:
@@ -1305,7 +1305,9 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
|
||||
|
||||
if ((window->flags & SDL_WINDOW_OPENGL) != (flags & SDL_WINDOW_OPENGL)) {
|
||||
if (flags & SDL_WINDOW_OPENGL) {
|
||||
SDL_GL_LoadLibrary(NULL);
|
||||
if (SDL_GL_LoadLibrary(NULL) < 0) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
SDL_GL_UnloadLibrary();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user