Skip to content

Commit

Permalink
Call SDL_DiscardAllCommands() for the software renderer as well
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 20, 2025
1 parent 8f4c5e1 commit 1a38960
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/render/SDL_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -5217,9 +5217,8 @@ void SDL_DestroyRendererWithoutFreeing(SDL_Renderer *renderer)
if (renderer->software) {
// Make sure all drawing to a surface is complete
FlushRenderCommands(renderer);
} else {
SDL_DiscardAllCommands(renderer);
}
SDL_DiscardAllCommands(renderer);

if (renderer->debug_char_texture_atlas) {
SDL_DestroyTexture(renderer->debug_char_texture_atlas);
Expand Down

0 comments on commit 1a38960

Please sign in to comment.