diff --git a/src/client/QXmppHttpFileSharingProvider.cpp b/src/client/QXmppHttpFileSharingProvider.cpp index 5b7304c5a..7b1b5b783 100644 --- a/src/client/QXmppHttpFileSharingProvider.cpp +++ b/src/client/QXmppHttpFileSharingProvider.cpp @@ -160,7 +160,7 @@ auto QXmppHttpFileSharingProvider::uploadFile(std::unique_ptr data, // reduce ref count, so the signal connection doesn't keep the state alive forever state.reset(); }); - QObject::connect(state->upload.get(), &QXmppHttpUpload::progressChanged, [stateRef = std::weak_ptr(state), reportProgress = std::move(reportProgress)]() { + QObject::connect(state->upload.get(), &QXmppHttpUpload::progressChanged, [stateRef = std::weak_ptr(state), reportProgress = std::move(reportProgress)]() { if (auto state = stateRef.lock()) { reportProgress(state->upload->bytesSent(), state->upload->bytesTotal()); }