Don't crash in WIN_GL_InitExtensions() if the OpenGL library couldn't be loaded
authorSam Lantinga <slouken@libsdl.org>
Wed, 23 Apr 2014 13:47:57 -0700
changeset 87352134fc16252b
parent 8734 cb61954403ca
child 8736 bd7629d87774
Don't crash in WIN_GL_InitExtensions() if the OpenGL library couldn't be loaded
src/video/windows/SDL_windowsopengl.c
     1.1 --- a/src/video/windows/SDL_windowsopengl.c	Wed Apr 23 13:47:52 2014 -0700
     1.2 +++ b/src/video/windows/SDL_windowsopengl.c	Wed Apr 23 13:47:57 2014 -0700
     1.3 @@ -334,6 +334,10 @@
     1.4      HGLRC hglrc;
     1.5      PIXELFORMATDESCRIPTOR pfd;
     1.6  
     1.7 +    if (!_this->gl_data) {
     1.8 +        return;
     1.9 +    }
    1.10 +
    1.11      hwnd =
    1.12          CreateWindow(SDL_Appname, SDL_Appname, (WS_POPUP | WS_DISABLED), 0, 0,
    1.13          10, 10, NULL, NULL, SDL_Instance, NULL);