in automationPattern::valueAt() check whether the time-map is empty
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1236 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -218,6 +218,10 @@ void automationPattern::openInAutomationEditor( void )
|
||||
|
||||
float automationPattern::valueAt( const midiTime & _time )
|
||||
{
|
||||
if( m_timeMap.isEmpty() )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
timeMap::const_iterator v = m_timeMap.lowerBound( _time );
|
||||
return( ( v != m_timeMap.end() ) ? v.value() : (v-1).value() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user