diff --git a/plugins/mission/mission_impl.cpp b/plugins/mission/mission_impl.cpp index 30989d4670..b0bf98ebf3 100644 --- a/plugins/mission/mission_impl.cpp +++ b/plugins/mission/mission_impl.cpp @@ -140,6 +140,11 @@ void MissionImpl::process_mission_ack(const mavlink_message_t &message) { std::lock_guard lock(_mission_data.mutex); temp_callback = _mission_data.result_callback; + // For the odd case where mission_ack is processed twice in quick succession + // we need to make sure we only copy the callback once and only get nullptr + // for the subsequent case. Otherwise we might report a result twice and + // upset a caller. + _mission_data.result_callback = nullptr; } {