Merge pull request #601 from Vort/atv_mod_crash_fix

ATV Modulator: fix crash when m_pointsPerHBar = 0
This commit is contained in:
f4exb 2020-08-14 13:01:16 +02:00 committed by GitHub
commit afd76e274e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -611,7 +611,7 @@ void ATVModSource::applyStandard(const ATVModSettings& settings)
m_pointsPerImgLine = m_pointsPerLine - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP;
m_nbHorizPoints = m_pointsPerLine;
m_pointsPerHBar = m_pointsPerImgLine / m_nbBars;
m_pointsPerHBar = std::max(1, m_pointsPerImgLine / m_nbBars);
m_hBarIncrement = m_spanLevel / (float) (m_nbBars - 1);
m_vBarIncrement = m_spanLevel / (float) (m_nbBars - 1);