aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2023-02-23 12:18:04 +0100
committerLinus Jahn <lnj@kaidan.im>2023-02-23 12:40:29 +0100
commit7123da8b3856c53cf83ae56e33146b3d698b6792 (patch)
tree1e532b47a82387a94cb97776d7e52323894cb25f
parent79e684bad566a56c17c1cc270e90b0bfb9de28f2 (diff)
FileSharingManager: Fix UB because of use after move
Fixes #538.
-rw-r--r--src/client/QXmppFileSharingManager.cpp2
1 files changed, 1 insertions, 1 deletions
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<QXmppFileDownload> 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 {