Strange TTF_CloseFont and freetype crash

I can confirm that (at least with gcc). You should see two “del” messages. (I also added a loaded message here)

loaded 2148058184
del 2148058184
del 2148058184

Thread 1 "font" received signal SIGSEGV, Segmentation fault.
0xb7a62119 in FT_Done_Face () from /usr/lib/libfreetype.so.6
(gdb) bt
#0  0xb7a62119 in FT_Done_Face () from /usr/lib/libfreetype.so.6
#1  0xb7efb3a4 in TTF_CloseFont () from /usr/lib/libSDL_ttf-2.0.so.0
#2  0x80001024 in Font::~Font (this=0xbffffa18, __in_chrg=<optimized out>) at font.cpp:18
#3  0x80000e9f in Test::~Test (this=0xbffffa18, __in_chrg=<optimized out>) at main.cpp:5
#4  0x80000d03 in run () at main.cpp:14
#5  0x80000d4e in main (argc=1, argv=0xbffffae4) at main.cpp:21