Fixed memory leak in SDL_DestroyRenderer.
Fixes Bugzilla #1219. Thanks to Dimitris Zenios for the patch!
This commit is contained in:
parent
0b3c783570
commit
2fdcb7bdfc
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue