From fcf929aa2f95e4956cbca4574870c0a507ac6cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Tue, 12 Aug 2014 13:21:13 -0300 Subject: [PATCH] (SDL2) Properly deinitialize the video driver --- gfx/sdl2_gfx.c | 6 ++++++ 1 file changed, 6 insertions(+) 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)