From 81594c1abc3b7d005e944c19953dca302644a224 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 1 Mar 2013 09:42:39 +0100 Subject: [PATCH] Hotfix: return correct value for orb_check() for never-published topics --- apps/uORB/uORB.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/uORB/uORB.cpp b/apps/uORB/uORB.cpp index 532e54b8e0..41f399f2c2 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