# HG changeset patch # User Sam Lantinga # Date 1297273000 28800 # Node ID c7be6ca3a0b843c556d855c89ca8b842b840b9ad # Parent 1e28342cb15d0f9b9928bc9dc38389c395240e6a Fixed crash when shaders are not supported diff -r 1e28342cb15d -r c7be6ca3a0b8 test/testshader.c --- a/test/testshader.c Tue Feb 08 23:13:58 2011 -0800 +++ b/test/testshader.c Wed Feb 09 09:36:40 2011 -0800 @@ -181,9 +181,11 @@ static void DestroyShaderProgram(ShaderData *data) { - glDeleteObjectARB(data->vert_shader); - glDeleteObjectARB(data->frag_shader); - glDeleteObjectARB(data->program); + if (shaders_supported) { + glDeleteObjectARB(data->vert_shader); + glDeleteObjectARB(data->frag_shader); + glDeleteObjectARB(data->program); + } } static SDL_bool InitShaders() @@ -481,3 +483,5 @@ } #endif /* HAVE_OPENGL */ + +/* vi: set ts=4 sw=4 expandtab: */