mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 14:46:33 +02:00
* Fixed potential memleak.
This commit is contained in:
@@ -227,12 +227,6 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
m_mediaObject->setCurrentSource( io.data() );
|
m_mediaObject->setCurrentSource( io.data() );
|
||||||
m_mediaObject->currentSource().setAutoDelete( false );
|
m_mediaObject->currentSource().setAutoDelete( false );
|
||||||
m_isPlayingHttp = false;
|
m_isPlayingHttp = false;
|
||||||
|
|
||||||
if ( !m_input.isNull() )
|
|
||||||
{
|
|
||||||
m_input->close();
|
|
||||||
m_input.clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -247,6 +241,11 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
m_isPlayingHttp = true;
|
m_isPlayingHttp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !m_input.isNull() )
|
||||||
|
{
|
||||||
|
m_input->close();
|
||||||
|
m_input.clear();
|
||||||
|
}
|
||||||
m_input = io;
|
m_input = io;
|
||||||
m_mediaObject->play();
|
m_mediaObject->play();
|
||||||
emit started( m_currentTrack );
|
emit started( m_currentTrack );
|
||||||
|
Reference in New Issue
Block a user