Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed memory leak in SDL_DestroyRenderer.
Browse files Browse the repository at this point in the history
Fixes Bugzilla #1219.

Thanks to Dimitris Zenios for the patch!
  • Loading branch information
icculus committed Jul 16, 2011
1 parent 7d3f096 commit f38adce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/render/opengl/SDL_render_gl.c
Expand Up @@ -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);
Expand Down

0 comments on commit f38adce

Please sign in to comment.