Mercurial > sdl-ios-xcode
comparison src/render/opengl/SDL_shaders_gl.c @ 5242:55b31686f82b
Fixed crash when shaders aren't available.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 09 Feb 2011 10:13:26 -0800 |
parents | e82908c86c9c |
children | c0e9d3897a85 |
comparison
equal
deleted
inserted
replaced
5241:c7be6ca3a0b8 | 5242:55b31686f82b |
---|---|
272 shaders_supported = SDL_TRUE; | 272 shaders_supported = SDL_TRUE; |
273 } | 273 } |
274 } | 274 } |
275 | 275 |
276 if (!shaders_supported) { | 276 if (!shaders_supported) { |
277 GL_DestroyShaderContext(ctx); | 277 SDL_free(ctx); |
278 return NULL; | 278 return NULL; |
279 } | 279 } |
280 | 280 |
281 /* Compile all the shaders */ | 281 /* Compile all the shaders */ |
282 for (i = 0; i < NUM_SHADERS; ++i) { | 282 for (i = 0; i < NUM_SHADERS; ++i) { |