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

Commit

Permalink
Fixed crash if the rendering system couldn't create an OpenGL window.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 8, 2012
1 parent ee707b5 commit 939c9e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/render/opengl/SDL_render_gl.c
Expand Up @@ -239,6 +239,8 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
window_flags = SDL_GetWindowFlags(window);
if (!(window_flags & SDL_WINDOW_OPENGL)) {
if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) {
/* Uh oh, better try to put it back... */
SDL_RecreateWindow(window, window_flags);
return NULL;
}
}
Expand Down

0 comments on commit 939c9e0

Please sign in to comment.