1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-19 13:01:32 +01:00

Move watcher->deleteLater(); at the end of the BlockingSearchFinished() function to ensure the watcher object is still available when emitting the signals.

This commit is contained in:
Andreas 2015-05-04 16:25:49 +02:00
parent 28fb6e5fcb
commit 059aa7f832

View File

@ -89,11 +89,12 @@ void BlockingSearchProvider::SearchAsync(int id, const QString& query) {
void BlockingSearchProvider::BlockingSearchFinished() {
BoundFutureWatcher<ResultList, int>* watcher =
static_cast<BoundFutureWatcher<ResultList, int>*>(sender());
watcher->deleteLater();
const int id = watcher->data();
emit ResultsAvailable(id, watcher->result());
emit SearchFinished(id);
watcher->deleteLater();
}
QImage SearchProvider::ScaleAndPad(const QImage& image) {