From 73d612738a3bc91914392ddce8b9f5dfde6393f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ars=C3=A8ne=20P=C3=A9rard-Gayot?= Date: Fri, 5 Apr 2024 14:58:23 +0200 Subject: [PATCH] Bug fix: Move calls to `SDL_Quit()` and `SDL_VideoQuit()` last --- src/driver/sdl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/driver/sdl.c b/src/driver/sdl.c index 79eb02bc..402dfc04 100644 --- a/src/driver/sdl.c +++ b/src/driver/sdl.c @@ -243,8 +243,6 @@ struct sdl_window *win_try_init(struct sdl_prefs *prefs, int width, int height) void win_destroy(struct sdl_window *w) { if (!w) return; if (w->sym) { - w->sym->SDL_VideoQuit(); - w->sym->SDL_Quit(); if (w->texture) { w->sym->SDL_DestroyTexture(w->texture); w->texture = NULL; @@ -263,6 +261,8 @@ void win_destroy(struct sdl_window *w) { w->sym->SDL_DestroyWindow(w->window); w->window = NULL; } + w->sym->SDL_VideoQuit(); + w->sym->SDL_Quit(); dyn_close(w->sym->lib); free(w->sym); }