From e3fa04a57c86f5f229acc77d9f67906dee2d3d5b Mon Sep 17 00:00:00 2001 From: Chris Moeller Date: Tue, 15 Oct 2013 11:41:57 -0700 Subject: [PATCH] Remove newly added entry from the cache if the font failed to load --- Plugins/MIDI/MIDI/BMPlayer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Plugins/MIDI/MIDI/BMPlayer.cpp b/Plugins/MIDI/MIDI/BMPlayer.cpp index b251a2390..295d33011 100644 --- a/Plugins/MIDI/MIDI/BMPlayer.cpp +++ b/Plugins/MIDI/MIDI/BMPlayer.cpp @@ -84,6 +84,10 @@ HSOUNDFONT cache_open( const char * path ) entry.handle = font; entry.ref_count = 1; } + else + { + Cache_List.erase( path ); + } } else font = entry.handle;