mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 07:07:05 +02:00
* Fixed crash in AudioEngine.
This commit is contained in:
@@ -158,14 +158,17 @@ void
|
|||||||
AudioEngine::stop()
|
AudioEngine::stop()
|
||||||
{
|
{
|
||||||
tDebug( LOGEXTRA ) << Q_FUNC_INFO;
|
tDebug( LOGEXTRA ) << Q_FUNC_INFO;
|
||||||
|
if ( isStopped() )
|
||||||
|
return;
|
||||||
|
|
||||||
setState( Stopped );
|
setState( Stopped );
|
||||||
m_mediaObject->stop();
|
m_mediaObject->stop();
|
||||||
|
|
||||||
if ( !m_playlist.isNull() )
|
if ( !m_playlist.isNull() )
|
||||||
m_playlist.data()->reset();
|
m_playlist.data()->reset();
|
||||||
|
if ( !m_currentTrack.isNull() )
|
||||||
|
emit timerPercentage( ( (double)m_timeElapsed / (double)m_currentTrack->duration() ) * 100.0 );
|
||||||
|
|
||||||
emit timerPercentage( ( (double)m_timeElapsed / (double)m_currentTrack->duration() ) * 100.0 );
|
|
||||||
emit stopped();
|
emit stopped();
|
||||||
setCurrentTrack( Tomahawk::result_ptr() );
|
setCurrentTrack( Tomahawk::result_ptr() );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user