From 3e3570dff73a7d465a27f4c433621c84e4bb4e43 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 23 Apr 2014 13:47:57 -0700 Subject: [PATCH] Don't crash in WIN_GL_InitExtensions() if the OpenGL library couldn't be loaded --- src/video/windows/SDL_windowsopengl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c index 80ba3b45d..71855c874 100644 --- a/src/video/windows/SDL_windowsopengl.c +++ b/src/video/windows/SDL_windowsopengl.c @@ -334,6 +334,10 @@ WIN_GL_InitExtensions(_THIS) HGLRC hglrc; PIXELFORMATDESCRIPTOR pfd; + if (!_this->gl_data) { + return; + } + hwnd = CreateWindow(SDL_Appname, SDL_Appname, (WS_POPUP | WS_DISABLED), 0, 0, 10, 10, NULL, NULL, SDL_Instance, NULL);