Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed crash if the rendering system couldn't create an OpenGL window.

  • Loading branch information
slouken committed Jan 8, 2012
1 parent ee707b5 commit 939c9e0efce24a697cc88eeb24b031e885bc0775

File 1 of 1 in 939c9e0

@@ -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;
}
}

0 comments on commit 939c9e0

Please sign in to comment.