Extra runtime check in CanIOManager queue

This commit is contained in:
Pavel Kirienko 2014-04-05 17:14:55 +04:00
parent e077bbf7a9
commit f32cd16f77

View File

@ -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)
{