Don't run metronome when project is empty (#3173)

This commit is contained in:
Oskar Wallgren
2016-12-22 15:30:18 +01:00
committed by GitHub
parent 3de95a148d
commit 6e66665687

View File

@@ -349,7 +349,9 @@ const surroundSampleFrame * Mixer::renderNextBuffer()
currentPlayMode == Song::Mode_PlayBB;
if( playModeSupportsMetronome && m_metronomeActive && !song->isExporting() &&
p != last_metro_pos )
p != last_metro_pos &&
// Stop crash with metronome if empty project
Engine::getSong()->countTracks() )
{
tick_t ticksPerTact = MidiTime::ticksPerTact();
if ( p.getTicks() % (ticksPerTact / 1 ) == 0 )