1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Make sure if an event has a null handle and the queue is full we don't try and

query UAVObjID
This commit is contained in:
James Cotton 2012-03-11 21:16:17 -05:00
parent c7ff2a46c7
commit 8059004755

View File

@ -350,7 +350,8 @@ static int32_t processPeriodicUpdates()
{
if ( xQueueSend(objEntry->evInfo.queue, &objEntry->evInfo.ev, 0) != pdTRUE ) // do not block if queue is full
{
stats.lastErrorID = UAVObjGetID(objEntry->evInfo.ev.obj);
if (objEntry->evInfo.ev.obj != NULL)
stats.lastErrorID = UAVObjGetID(objEntry->evInfo.ev.obj);
++stats.eventErrors;
}
}