diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-03-01 09:42:39 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-03-01 09:42:39 +0100 |
commit | 81594c1abc3b7d005e944c19953dca302644a224 (patch) | |
tree | b960ea2641acab4d06a0453aca5ba8f59a97e861 /apps/uORB/uORB.cpp | |
parent | 2e321f273ca66642f5cae415c069ca4cc3c073ba (diff) | |
download | px4-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.cpp | 4 |
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 |