SDL_GL_DeleteContext would leave an invalid current_glctx.
Calling SDL_GL_DeleteContext wouldn't update current_glctx, so you could end up with use-after-free and other goodies when you deleted a context.
This commit is contained in:
parent
5a4c9c40f2
commit
187143d618
2 changed files with 12 additions and 8 deletions
|
@ -1241,8 +1241,7 @@ GL_DestroyRenderer(SDL_Renderer * renderer)
|
|||
GL_CheckError("", renderer);
|
||||
SDL_free(data->framebuffers);
|
||||
data->framebuffers = nextnode;
|
||||
}
|
||||
/* SDL_GL_MakeCurrent(0, NULL); *//* doesn't do anything */
|
||||
}
|
||||
SDL_GL_DeleteContext(data->context);
|
||||
}
|
||||
SDL_free(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue