Don't try to create an OpenGL window if we can't load the OpenGL library.
authorSam Lantinga <slouken@libsdl.org>
Sun, 28 Oct 2012 14:16:18 -0700
changeset 66115c8b5b03ad8a
parent 6610 4032f8efdfe7
child 6612 9a22ac8befa9
Don't try to create an OpenGL window if we can't load the OpenGL library.
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Sun Oct 28 13:03:45 2012 -0700
     1.2 +++ b/src/video/SDL_video.c	Sun Oct 28 14:16:18 2012 -0700
     1.3 @@ -1168,7 +1168,9 @@
     1.4              SDL_SetError("No OpenGL support in video driver");
     1.5              return NULL;
     1.6          }
     1.7 -        SDL_GL_LoadLibrary(NULL);
     1.8 +        if (SDL_GL_LoadLibrary(NULL) < 0) {
     1.9 +            return NULL;
    1.10 +        }
    1.11      }
    1.12      window = (SDL_Window *)SDL_calloc(1, sizeof(*window));
    1.13      window->magic = &_this->window_magic;