deleteImages() is fine (I assume), that’s just here to give context
You don’t need to free the display surface. I’m not sure what effect doing
it actually has, though…?
TTF_CloseFont() is good…
TTF_Quit() causes a crash; not this one though, but when you initialised the
TTF library, you set an atexit handler to call TTF_Quit. So when you hit that
exit(0) statement, it gets called - again. This causes a segfault in
TT_Get_Font_Data().
The same problem exists with SDL_Quit(), probably.
Anyway, commenting out those there lines results in a clean exit for me.
deleteImages() is fine (I assume), that’s just here to give context
You don’t need to free the display surface. I’m not sure what effect doing
it actually has, though…?
TTF_CloseFont() is good…
TTF_Quit() causes a crash; not this one though, but when you initialised the
TTF library, you set an atexit handler to call TTF_Quit. So when you hit that
exit(0) statement, it gets called - again. This causes a segfault in
TT_Get_Font_Data().
The same problem exists with SDL_Quit(), probably.
Anyway, commenting out those there lines results in a clean exit for me.