diff --git a/ChangeLog b/ChangeLog index 8625f6127..53f8a7a13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-30 Tobias Doerffel + + * plugins/sf2_player/sf2_player.cpp: + duplicate char-pointer returned by qPrintable - fixes bugs when + loading sound-fonts + 2008-03-24 Tobias Doerffel * src/core/fx_mixer.cpp: diff --git a/configure.in b/configure.in index 912dd98df..e7cddf812 100644 --- a/configure.in +++ b/configure.in @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) -AC_INIT(lmms, 0.4.0-svn20080324, lmms-devel/at/lists/dot/sf/dot/net) -AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20080324) +AC_INIT(lmms, 0.4.0-svn20080330, lmms-devel/at/lists/dot/sf/dot/net) +AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20080330) AM_CONFIG_HEADER(config.h) diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 87631ba67..a40c76c2c 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -164,10 +164,10 @@ void sf2Instrument::openFile( const QString & _sf2File ) // on all fonts. This, causes sfloaderFreeFont to run. } - const char * sf2Ascii = qPrintable( _sf2File ); + char * sf2Ascii = qstrdup( qPrintable( _sf2File ) ); m_fontId = fluid_synth_sfload( m_synth, sf2Ascii, TRUE ); - QString sf2Key = qPrintable( _sf2File ); + QString sf2Key( sf2Ascii ); // Add to map, if doesn't exist. // We can't do this in callback because fluid hasn't created the sfont yet @@ -192,6 +192,8 @@ void sf2Instrument::openFile( const QString & _sf2File ) emit fileChanged(); } + + delete[] sf2Ascii; }