Skip to content

Commit

Permalink
render: Set renderer->window to NULL in SDL_DestroyRendererWithoutFre…
Browse files Browse the repository at this point in the history
…eing.

This wasn't triggering a bug afaik, but obviously the more correct thing to do.

Reference Issue libsdl-org#10174.
  • Loading branch information
icculus committed Jul 4, 2024
1 parent d13fc3c commit 9f8dffb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/render/SDL_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -4603,6 +4603,7 @@ void SDL_DestroyRendererWithoutFreeing(SDL_Renderer *renderer)

if (renderer->window) {
SDL_ClearProperty(SDL_GetWindowProperties(renderer->window), SDL_PROP_WINDOW_RENDERER_POINTER);
renderer->window = NULL;
}

/* Free the target mutex */
Expand Down

0 comments on commit 9f8dffb

Please sign in to comment.