From f12e609c21e84b77f5252e6b00e5fdb933b168ab Mon Sep 17 00:00:00 2001 From: Green Sky Date: Mon, 2 Oct 2023 19:09:37 +0200 Subject: [PATCH] fix double emplace issue --- solanaceae/tox_messages/tox_transfer_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solanaceae/tox_messages/tox_transfer_manager.cpp b/solanaceae/tox_messages/tox_transfer_manager.cpp index 14f25cc..d691557 100644 --- a/solanaceae/tox_messages/tox_transfer_manager.cpp +++ b/solanaceae/tox_messages/tox_transfer_manager.cpp @@ -513,7 +513,7 @@ bool ToxTransferManager::onToxEvent(const Tox_Event_File_Recv_Chunk* e) { transfer.emplace(); // re-unread a finished transfer - transfer.emplace(); + transfer.emplace_or_replace(); _rmm.throwEventUpdate(transfer); } else if (!transfer.all_of() || !transfer.get()->isGood()) {