Fixed memory leak in SDL_DestroyRenderer.

Fixes Bugzilla #1219.

Thanks to Dimitris Zenios for the patch!
This commit is contained in:
Ryan C. Gordon
2011-07-16 14:59:12 -07:00
parent ce1df1e5db
commit 41447caf1c

View File

@@ -1011,6 +1011,9 @@ GL_DestroyRenderer(SDL_Renderer * renderer)
GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
if (data) {
if (data->shaders) {
GL_DestroyShaderContext(data->shaders);
}
if (data->context) {
/* SDL_GL_MakeCurrent(0, NULL); *//* doesn't do anything */
SDL_GL_DeleteContext(data->context);