diff --git a/libuavcan/src/transport/uc_can_io.cpp b/libuavcan/src/transport/uc_can_io.cpp index 20fe36bf66..e3a45a4ef5 100644 --- a/libuavcan/src/transport/uc_can_io.cpp +++ b/libuavcan/src/transport/uc_can_io.cpp @@ -136,6 +136,11 @@ void CanTxQueue::push(const CanFrame& frame, MonotonicTime tx_deadline, Qos qos, // Find a frame with lowest QoS Entry* p = queue_.get(); + if (p == NULL) + { + UAVCAN_TRACE("CanTxQueue", "Push rejected: Nothing to replace"); + return; + } Entry* lowestqos = p; while (p) {