1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

ATV Modulator: fix crash when m_pointsPerHBar = 0

This commit is contained in:
Vort 2020-08-14 11:07:54 +03:00
parent e6d9e4758c
commit fe1f2305a5

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);