Mercurial > hg > svapp
diff audio/AudioCallbackPlaySource.cpp @ 713:ce698f8d0831
Avoid floating-point exception when stopping after models deleted
author | Chris Cannam |
---|---|
date | Fri, 11 Oct 2019 13:40:54 +0100 |
parents | e0b0f3e163ca |
children | 497d80d3b9c4 |
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; }