From 7123da8b3856c53cf83ae56e33146b3d698b6792 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Thu, 23 Feb 2023 12:18:04 +0100 Subject: FileSharingManager: Fix UB because of use after move Fixes #538. --- src/client/QXmppFileSharingManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/QXmppFileSharingManager.cpp b/src/client/QXmppFileSharingManager.cpp index f86a1a19..87f8dc05 100644 --- a/src/client/QXmppFileSharingManager.cpp +++ b/src/client/QXmppFileSharingManager.cpp @@ -569,7 +569,7 @@ std::shared_ptr QXmppFileSharingManager::downloadFile( std::move(file), transform(download->d->hashes, [](auto hash) { return hash; })); - await(download->d->hashesFuture, this, [download = std::move(download)](HashVerificationResultPtr hashResult) { + await(download->d->hashesFuture, this, [download](HashVerificationResultPtr hashResult) { auto convert = overloaded { [](HashVerificationResult::NoStrongHashes) { return QXmppFileDownload::Downloaded { -- cgit v1.2.3