Fixed crash if the rendering system couldn't create an OpenGL window.
authorSam Lantinga
Sat, 07 Jan 2012 21:01:33 -0800
changeset 6182eb6796f3e598
parent 6181 e29f01fa2750
child 6183 6d9a266e04bb
Fixed crash if the rendering system couldn't create an OpenGL window.
src/render/opengl/SDL_render_gl.c
     1.1 --- a/src/render/opengl/SDL_render_gl.c	Sat Jan 07 23:33:15 2012 -0500
     1.2 +++ b/src/render/opengl/SDL_render_gl.c	Sat Jan 07 21:01:33 2012 -0800
     1.3 @@ -239,6 +239,8 @@
     1.4      window_flags = SDL_GetWindowFlags(window);
     1.5      if (!(window_flags & SDL_WINDOW_OPENGL)) {
     1.6          if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) {
     1.7 +            /* Uh oh, better try to put it back... */
     1.8 +            SDL_RecreateWindow(window, window_flags);
     1.9              return NULL;
    1.10          }
    1.11      }