# HG changeset patch # User Chris Cannam # Date 1548065306 0 # Node ID d794630429a78ace935810b81229c1c05fab0642 # Parent 89d124ac9bfabc219cb4e4a8d726dfd0d3be13fb Fix potential divide-by-zero diff -r 89d124ac9bfa -r d794630429a7 view/View.cpp --- a/view/View.cpp Mon Jan 21 10:07:36 2019 +0000 +++ b/view/View.cpp Mon Jan 21 10:08:26 2019 +0000 @@ -1158,7 +1158,10 @@ sv_frame_t w = getEndFrame() - getStartFrame(); w -= w/5; - sv_frame_t sf = (m_playPointerFrame / w) * w - w/8; + sv_frame_t sf = m_playPointerFrame; + if (w > 0) { + sf = (sf / w) * w - w/8; + } if (m_manager && m_manager->isPlaying() &&