diff --git a/ChangeLog b/ChangeLog index e6e585a3a..6d0ec536a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-10-18 Tobias Doerffel + * plugins/sf2_player/sf2_player.cpp: + do not mess around with global static pointers for a single instance + of patchesDialog - create a local object instead (closes #2139701) + * include/file_browser.h: * src/gui/file_browser.cpp: added filter feature allowing quick file access diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 451b282d9..cf5bcb4e8 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -298,7 +298,6 @@ void sf2Instrument::freeFont( void ) { cout << "Really deleting " << m_filename << endl; - printf("%d\n", sf2Instrument::s_fonts.remove( m_filename ) ); fluid_synth_sfunload( m_synth, m_fontId, TRUE ); delete m_font; @@ -994,22 +993,17 @@ void sf2InstrumentView::showFileDialog( void ) -// Single instance of the patch dialog -patchesDialog * sf2InstrumentView::s_patchDialog = NULL; void sf2InstrumentView::showPatchDialog( void ) { sf2Instrument * k = castModel(); - if( s_patchDialog == NULL ) - { - s_patchDialog = new patchesDialog( this ); - } + patchesDialog pd( this ); - s_patchDialog->setup( k->m_synth, 1, k->getInstrumentTrack()->name(), + pd.setup( k->m_synth, 1, k->getInstrumentTrack()->name(), &k->m_bankNum, &k->m_patchNum, m_patchLabel ); - s_patchDialog->exec(); + pd.exec(); }