aboutsummaryrefslogtreecommitdiff
path: root/apps/uORB/uORB.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-03-01 09:42:39 +0100
committerLorenz Meier <lm@inf.ethz.ch>2013-03-01 09:42:39 +0100
commit81594c1abc3b7d005e944c19953dca302644a224 (patch)
treeb960ea2641acab4d06a0453aca5ba8f59a97e861 /apps/uORB/uORB.cpp
parent2e321f273ca66642f5cae415c069ca4cc3c073ba (diff)
downloadpx4-firmware-81594c1abc3b7d005e944c19953dca302644a224.tar.gz
px4-firmware-81594c1abc3b7d005e944c19953dca302644a224.tar.bz2
px4-firmware-81594c1abc3b7d005e944c19953dca302644a224.zip
Hotfix: return correct value for orb_check() for never-published topics
Diffstat (limited to 'apps/uORB/uORB.cpp')
-rw-r--r--apps/uORB/uORB.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/uORB/uORB.cpp b/apps/uORB/uORB.cpp
index 532e54b8e..41f399f2c 100644
--- a/apps/uORB/uORB.cpp
+++ b/apps/uORB/uORB.cpp
@@ -429,6 +429,10 @@ ORBDevNode::appears_updated(SubscriberData *sd)
/* avoid racing between interrupt and non-interrupt context calls */
irqstate_t state = irqsave();
+ /* check if this topic has been published yet, if not bail out */
+ if (_data == nullptr)
+ ret = false;
+
/*
* If the subscriber's generation count matches the update generation
* count, there has been no update from their perspective; if they