test/testshader.c
changeset 5236 c7be6ca3a0b8
parent 5232 74bc160186a8
child 5535 96594ac5fd1a
     1.1 --- a/test/testshader.c	Tue Feb 08 23:13:58 2011 -0800
     1.2 +++ b/test/testshader.c	Wed Feb 09 09:36:40 2011 -0800
     1.3 @@ -181,9 +181,11 @@
     1.4  
     1.5  static void DestroyShaderProgram(ShaderData *data)
     1.6  {
     1.7 -    glDeleteObjectARB(data->vert_shader);
     1.8 -    glDeleteObjectARB(data->frag_shader);
     1.9 -    glDeleteObjectARB(data->program);
    1.10 +    if (shaders_supported) {
    1.11 +        glDeleteObjectARB(data->vert_shader);
    1.12 +        glDeleteObjectARB(data->frag_shader);
    1.13 +        glDeleteObjectARB(data->program);
    1.14 +    }
    1.15  }
    1.16  
    1.17  static SDL_bool InitShaders()
    1.18 @@ -481,3 +483,5 @@
    1.19  }
    1.20  
    1.21  #endif /* HAVE_OPENGL */
    1.22 +
    1.23 +/* vi: set ts=4 sw=4 expandtab: */