Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segmentation fault after destorying window #22

Merged
merged 1 commit into from
Jul 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ static void _twin_sdl_put_span(twin_coord_t left,

static void _twin_sdl_destroy(twin_screen_t *screen, twin_sdl_t *tx)
{
twin_screen_destroy(screen);

SDL_DestroyTexture(tx->texture);
SDL_DestroyRenderer(tx->render);
SDL_DestroyWindow(tx->win);
SDL_Quit();

twin_screen_destroy(screen);
}

static void twin_sdl_damage(twin_screen_t *screen, twin_sdl_t *tx)
Expand Down