do not crash when loading settings where no file is set

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@746 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-03-01 22:25:32 +00:00
parent 518bcf6c17
commit 2749e6ee2b
2 changed files with 9 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
2008-03-01 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* plugins/patman/patman.cpp:
do not crash when loading settings where no file is set
* plugins/triple_oscillator/triple_oscillator.cpp:
in saveSettings() fixed wrong integer-to-string-conversion which made
LMMS save broken files

View File

@@ -170,6 +170,12 @@ void patmanInstrument::deleteNotePluginData( notePlayHandle * _n )
void patmanInstrument::setFile( const QString & _patch_file, bool _rename )
{
if( _patch_file.size() <= 0 )
{
m_patchFile = QString::null;
return;
}
// is current instrument-track-name equal to previous-filename??
if( _rename &&
( getInstrumentTrack()->name() ==