From 681d8364e267325f612d88a34ab6873ce05690f2 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 24 Jan 2021 10:02:42 +0100 Subject: [PATCH] Fixed crash on upload failure --- .../serverconnection/src/connection/ft/FileTransferManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/serverconnection/src/connection/ft/FileTransferManager.cpp b/native/serverconnection/src/connection/ft/FileTransferManager.cpp index 6619065..a850083 100644 --- a/native/serverconnection/src/connection/ft/FileTransferManager.cpp +++ b/native/serverconnection/src/connection/ft/FileTransferManager.cpp @@ -473,7 +473,7 @@ void Transfer::handle_disconnect(bool write_disconnect) { auto mode = std::string{write_disconnect ? "write" : "read"}; if(source && source->stream_index() != source->byte_length()) { - this->call_callback_failed("received " + mode + " disconnect while transmitting data (" + to_string(target->stream_index()) + "/" + to_string(target->expected_length()) + ")"); + this->call_callback_failed("received " + mode + " disconnect while transmitting data (" + to_string(source->stream_index()) + "/" + to_string(source->byte_length()) + ")"); } else if(target && target->stream_index() != target->expected_length()) { this->call_callback_failed("received " + mode + " disconnect while receiving data (" + to_string(target->stream_index()) + "/" + to_string(target->expected_length()) + ")"); } else