mirror of
https://github.com/yawut/SDL.git
synced 2026-04-20 23:57:24 -05:00
Don't crash if loading the OpenGL library fails
This commit is contained in:
parent
b71c7f092b
commit
c8ff4f5a46
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user