Only cleanup the GL context if OpenGL was initialized

This commit is contained in:
Yamagi Burmeister 2013-06-15 10:24:14 +02:00
parent 9af9f54f36
commit 85571cfc56

View file

@ -363,10 +363,13 @@ GLimp_Shutdown(void)
current. This may help some broken
video drivers like the AMD Catalyst
to avoid artifacts in unused screen
areas, */
qglClearColor(0.0, 0.0, 0.0, 0.0);
qglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
GLimp_EndFrame();
areas. */
if (SDL_WasInit(SDL_INIT_VIDEO))
{
qglClearColor(0.0, 0.0, 0.0, 0.0);
qglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
GLimp_EndFrame();
}
if (surface)
{