Skip to content

Commit

Permalink
Add debug assertion to detect division-by-zero before it happens
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Jun 7, 2022
1 parent d3d47fc commit 9360294
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/engine/enginebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,7 @@ void EngineBuffer::updateIndicators(double speed, int iBufferSize) {
// called yet.
return;
}
DEBUG_ASSERT(m_tempo_ratio_old != 0);

// Increase samplesCalculated by the buffer size
m_iSamplesSinceLastIndicatorUpdate += iBufferSize;
Expand Down

0 comments on commit 9360294

Please sign in to comment.