From fe1f2305a55184b69410f332033f58f73b044697 Mon Sep 17 00:00:00 2001 From: Vort Date: Fri, 14 Aug 2020 11:07:54 +0300 Subject: [PATCH] ATV Modulator: fix crash when m_pointsPerHBar = 0 --- plugins/channeltx/modatv/atvmodsource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/channeltx/modatv/atvmodsource.cpp b/plugins/channeltx/modatv/atvmodsource.cpp index c27913dd0..c138b350a 100644 --- a/plugins/channeltx/modatv/atvmodsource.cpp +++ b/plugins/channeltx/modatv/atvmodsource.cpp @@ -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);