From 668e0d0e652184beb63cb0c9b156e29d4ee01fcd Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 25 Apr 2020 07:54:34 +1000 Subject: [PATCH] GCS_MAVLink: check for empty replies queue first thing in send_ftp_replies Will save us a little time on average --- libraries/GCS_MAVLink/GCS_FTP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_FTP.cpp b/libraries/GCS_MAVLink/GCS_FTP.cpp index 2053bfa61c..974abbd2dd 100644 --- a/libraries/GCS_MAVLink/GCS_FTP.cpp +++ b/libraries/GCS_MAVLink/GCS_FTP.cpp @@ -85,7 +85,7 @@ void GCS_MAVLINK::handle_file_transfer_protocol(const mavlink_message_t &msg) { } void GCS_MAVLINK::send_ftp_replies(void) { - if (ftp.replies == nullptr) { + if (ftp.replies == nullptr || ftp.replies->empty()) { return; }