diff --git a/src/musicscanner.cpp b/src/musicscanner.cpp index 6b66f79cc..3123f5ca4 100644 --- a/src/musicscanner.cpp +++ b/src/musicscanner.cpp @@ -283,6 +283,16 @@ MusicScanner::listerFinished( const QMap& newmtimes ) connect( cmd, SIGNAL( finished() ), SIGNAL( finished() ) ); Database::instance()->enqueue( QSharedPointer(cmd) ); + + if ( !m_dirLister.isNull() ) + { + m_dirListerThreadController->quit();; + m_dirListerThreadController->wait( 60000 ); + + delete m_dirLister.data(); + delete m_dirListerThreadController; + m_dirListerThreadController = 0; + } }