# HG changeset patch # User Chris Cannam # Date 1570797654 -3600 # Node ID ce698f8d0831572e9dcbebd1672a3bbbe9e21434 # Parent 8e9702c0b9c7df2ab241845711d867ae6c27cf0c Avoid floating-point exception when stopping after models deleted diff -r 8e9702c0b9c7 -r ce698f8d0831 audio/AudioCallbackPlaySource.cpp --- 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; }