mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 22:56:42 +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->currentSource().setAutoDelete( false );
|
||||
m_isPlayingHttp = false;
|
||||
|
||||
if ( !m_input.isNull() )
|
||||
{
|
||||
m_input->close();
|
||||
m_input.clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -247,6 +241,11 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
||||
m_isPlayingHttp = true;
|
||||
}
|
||||
|
||||
if ( !m_input.isNull() )
|
||||
{
|
||||
m_input->close();
|
||||
m_input.clear();
|
||||
}
|
||||
m_input = io;
|
||||
m_mediaObject->play();
|
||||
emit started( m_currentTrack );
|
||||
|
Reference in New Issue
Block a user