1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-24 01:39:42 +01:00

* Fixed crash in AudioEngine.

This commit is contained in:
Christian Muehlhaeuser 2011-09-10 05:32:31 +02:00
parent 3787eefa48
commit 859d2e8641

View File

@ -158,14 +158,17 @@ void
AudioEngine::stop()
{
tDebug( LOGEXTRA ) << Q_FUNC_INFO;
if ( isStopped() )
return;
setState( Stopped );
m_mediaObject->stop();
if ( !m_playlist.isNull() )
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();
setCurrentTrack( Tomahawk::result_ptr() );