mirror of
https://github.com/yawut/SDL.git
synced 2026-09-14 12:06:26 -05:00
Fixed memory leak in SDL_DestroyRenderer.
Fixes Bugzilla #1219. Thanks to Dimitris Zenios for the patch!
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user