diff --git a/gfx/sdl2_gfx.c b/gfx/sdl2_gfx.c index 7a1c56a17a..c9a67d4c78 100644 --- a/gfx/sdl2_gfx.c +++ b/gfx/sdl2_gfx.c @@ -568,6 +568,12 @@ static void sdl2_gfx_free(void *data) if (!vid) return; + if (vid->renderer) + SDL_DestroyRenderer(vid->renderer); + + if (vid->window) + SDL_DestroyWindow(vid->window); + SDL_QuitSubSystem(SDL_INIT_VIDEO); if (vid->font_data)