Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Don't crash if loading the OpenGL library fails
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 28, 2012
1 parent 71c643b commit 85b12be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video/SDL_video.c
Expand Up @@ -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();
}
Expand Down

0 comments on commit 85b12be

Please sign in to comment.