Mercurial > hg > svapp
changeset 713:ce698f8d0831
Avoid floating-point exception when stopping after models deleted
author | Chris Cannam |
---|---|
date | Fri, 11 Oct 2019 13:40:54 +0100 |
parents | 8e9702c0b9c7 |
children | fe268c16ae28 |
files | audio/AudioCallbackPlaySource.cpp |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/audio/AudioCallbackPlaySource.cpp Fri Oct 04 13:52:48 2019 +0100 +++ b/audio/AudioCallbackPlaySource.cpp Fri Oct 11 13:40:54 2019 +0100 @@ -546,9 +546,14 @@ m_lastRetrievalTimestamp = 0; if (changed) { emit playStatusChanged(m_playing); - emit activity(tr("Stop at %1").arg - (RealTime::frame2RealTime - (m_lastCurrentFrame, m_sourceSampleRate).toText().c_str())); + if (m_sourceSampleRate) { + emit activity(tr("Stop at %1").arg + (RealTime::frame2RealTime + (m_lastCurrentFrame, m_sourceSampleRate) + .toText().c_str())); + } else { + emit activity(tr("Stop")); + } } m_lastCurrentFrame = 0; }