fix segfault on quit

main
Patrick Cleaveliln 2025-07-25 02:38:12 +00:00
parent e3d41ccad6
commit c9991fb0ad
1 changed files with 3 additions and 2 deletions

View File

@ -286,6 +286,9 @@ main :: proc() {
log.error("SDL failed to initialize:", sdl2.GetError());
return;
}
defer {
sdl2.Quit();
}
if ttf.Init() < 0 {
log.error("SDL_TTF failed to initialize:", ttf.GetError());
@ -502,6 +505,4 @@ main :: proc() {
runtime.free_all(context.temp_allocator);
}
sdl2.Quit();
}