do not crash in patmanInstrument::playNote() when no file is set

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@747 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-03-01 23:42:27 +00:00
parent 2749e6ee2b
commit 5010db8164

View File

@@ -134,6 +134,11 @@ QString patmanInstrument::nodeName( void ) const
void patmanInstrument::playNote( notePlayHandle * _n, bool )
{
if( m_patchFile == "" )
{
return;
}
const fpp_t frames = _n->framesLeftForCurrentPeriod();
sampleFrame * buf = new sampleFrame[frames];