diff options
Diffstat (limited to 'apps/uORB/uORB.cpp')
-rw-r--r-- | apps/uORB/uORB.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/uORB/uORB.cpp b/apps/uORB/uORB.cpp index 532e54b8e..7abbf42ae 100644 --- a/apps/uORB/uORB.cpp +++ b/apps/uORB/uORB.cpp @@ -429,6 +429,12 @@ 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; + goto out; + } + /* * If the subscriber's generation count matches the update generation * count, there has been no update from their perspective; if they @@ -485,6 +491,7 @@ ORBDevNode::appears_updated(SubscriberData *sd) break; } +out: irqrestore(state); /* consider it updated */ |