Skip to content

Commit

Permalink
Bug fix: Move calls to SDL_Quit() and SDL_VideoQuit() last
Browse files Browse the repository at this point in the history
  • Loading branch information
madmann91 committed Apr 5, 2024
1 parent 0448117 commit 73d6127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/driver/sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down

0 comments on commit 73d6127

Please sign in to comment.