Skip to content

Commit e1892ce

Browse files
authored
Merge pull request #22 from a1091150/main
Fix segmentation fault after destorying window
2 parents 015045c + fbcbdd8 commit e1892ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/sdl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ static void _twin_sdl_put_span(twin_coord_t left,
5858

5959
static void _twin_sdl_destroy(twin_screen_t *screen, twin_sdl_t *tx)
6060
{
61-
twin_screen_destroy(screen);
62-
6361
SDL_DestroyTexture(tx->texture);
6462
SDL_DestroyRenderer(tx->render);
6563
SDL_DestroyWindow(tx->win);
6664
SDL_Quit();
65+
66+
twin_screen_destroy(screen);
6767
}
6868

6969
static void twin_sdl_damage(twin_screen_t *screen, twin_sdl_t *tx)

0 commit comments

Comments
 (0)