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:
parent
28fb6e5fcb
commit
059aa7f832
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user