From e6224304606e20bbf79280978ba70326eabea575 Mon Sep 17 00:00:00 2001 From: Thomas Gubler Date: Wed, 10 Dec 2014 12:41:54 +0100 Subject: [PATCH] px4 subscriber/nuttx: don't call null callback --- src/platforms/px4_subscriber.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platforms/px4_subscriber.h b/src/platforms/px4_subscriber.h index e995c6e49d..5d0120f90e 100644 --- a/src/platforms/px4_subscriber.h +++ b/src/platforms/px4_subscriber.h @@ -115,6 +115,10 @@ public: */ void update() { + if (_callback == nullptr) { + return; + } + if (!uORB::Subscription::updated()) { /* Topic not updated, do not call callback */ return;