From 433c9548589ebdc1ed40ab9f478b00f531b7bb47 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 1 Mar 2013 16:06:52 +0100 Subject: Hotfix: Fix program flow for uORB non-published topics --- apps/uORB/uORB.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/uORB/uORB.cpp b/apps/uORB/uORB.cpp index 41f399f2c..7abbf42ae 100644 --- a/apps/uORB/uORB.cpp +++ b/apps/uORB/uORB.cpp @@ -430,8 +430,10 @@ ORBDevNode::appears_updated(SubscriberData *sd) irqstate_t state = irqsave(); /* check if this topic has been published yet, if not bail out */ - if (_data == nullptr) + if (_data == nullptr) { ret = false; + goto out; + } /* * If the subscriber's generation count matches the update generation @@ -489,6 +491,7 @@ ORBDevNode::appears_updated(SubscriberData *sd) break; } +out: irqrestore(state); /* consider it updated */ -- cgit v1.2.3