1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

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

View File

@ -611,7 +611,7 @@ void ATVModSource::applyStandard(const ATVModSettings& settings)
m_pointsPerImgLine = m_pointsPerLine - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP; m_pointsPerImgLine = m_pointsPerLine - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP;
m_nbHorizPoints = m_pointsPerLine; 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_hBarIncrement = m_spanLevel / (float) (m_nbBars - 1);
m_vBarIncrement = m_spanLevel / (float) (m_nbBars - 1); m_vBarIncrement = m_spanLevel / (float) (m_nbBars - 1);