Remove newly added entry from the cache if the font failed to load

CQTexperiment
Chris Moeller 2013-10-15 11:41:57 -07:00
parent 99c1942eb3
commit e3fa04a57c
1 changed files with 4 additions and 0 deletions

View File

@ -84,6 +84,10 @@ HSOUNDFONT cache_open( const char * path )
entry.handle = font; entry.handle = font;
entry.ref_count = 1; entry.ref_count = 1;
} }
else
{
Cache_List.erase( path );
}
} }
else else
font = entry.handle; font = entry.handle;