try to use relative paths for s_fonts map too as otherwise s_fonts.remove( m_filename ) won't do anything if a full path was inserted and m_filename was made relative - fixes crash when re-opening a soundfont which was shared before
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1625 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -295,7 +295,7 @@ void sf2Instrument::freeFont( void )
|
||||
{
|
||||
cout << "Really deleting " << m_filename << endl;
|
||||
|
||||
sf2Instrument::s_fonts.remove( m_filename );
|
||||
printf("%d\n", sf2Instrument::s_fonts.remove( m_filename ) );
|
||||
fluid_synth_sfunload( m_synth, m_fontId, TRUE );
|
||||
|
||||
delete m_font;
|
||||
@@ -352,7 +352,7 @@ void sf2Instrument::openFile( const QString & _sf2File )
|
||||
{
|
||||
// Grab this sf from the top of the stack and add to list
|
||||
m_font = new sf2Font( fluid_synth_get_sfont( m_synth, 0 ) );
|
||||
s_fonts.insert( _sf2File, m_font );
|
||||
s_fonts.insert( sampleBuffer::tryToMakeRelative( _sf2File ), m_font );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user