diff --git a/devices/fsdevice.cpp b/devices/fsdevice.cpp index a003c95ce..c75f039ab 100644 --- a/devices/fsdevice.cpp +++ b/devices/fsdevice.cpp @@ -85,8 +85,12 @@ void MusicScanner::scan(const QString &folder, const QString &cacheFile, bool re fixLibrary(lib); if (!stopRequested) { emit libraryUpdated(lib); + } else { + delete lib; } return; + } else { + delete lib; } } diff --git a/http/httpserver.cpp b/http/httpserver.cpp index 94d990ce1..77bac6823 100644 --- a/http/httpserver.cpp +++ b/http/httpserver.cpp @@ -75,6 +75,7 @@ bool HttpServer::setDetails(const QString &addr, quint16 port) if (thread) { thread->quit(); + thread->deleteLater(); thread=0; } diff --git a/online/onlineservice.cpp b/online/onlineservice.cpp index 8b556f7cd..a5d3eba35 100644 --- a/online/onlineservice.cpp +++ b/online/onlineservice.cpp @@ -50,6 +50,9 @@ OnlineMusicLoader::OnlineMusicLoader(const QUrl &src) void OnlineMusicLoader::run() { + if (library) { + delete library; + } library = new MusicLibraryItemRoot; if (!readFromCache()) { emit status(i18n("Dowloading"), 0);