diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 82afb8489983492d4154a4e21b45d94b08961ca0..6f7bf351935074a88acffca2b1f4bd3d0cd5c33e 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -1838,6 +1838,12 @@ void Vehicle::sendMavCommand(int component, MAV_CMD command, bool showError, flo void Vehicle::_sendMavCommandAgain(void) { + if(!_mavCommandQueue.size()) { + qWarning() << "Command resend with no commands in queue"; + _mavCommandAckTimer.stop(); + return; + } + MavCommandQueueEntry_t& queuedCommand = _mavCommandQueue[0]; if (_mavCommandRetryCount++ > _mavCommandMaxRetryCount) {