diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-12-10 12:41:54 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-12-10 12:41:54 +0100 |
commit | e6224304606e20bbf79280978ba70326eabea575 (patch) | |
tree | 5db92fec5be018c09cba5aa8edfa91565687cc73 | |
parent | 24fd5759b5443cf198f29eb6d5eae8c80cb04fe0 (diff) | |
download | px4-firmware-e6224304606e20bbf79280978ba70326eabea575.tar.gz px4-firmware-e6224304606e20bbf79280978ba70326eabea575.tar.bz2 px4-firmware-e6224304606e20bbf79280978ba70326eabea575.zip |
px4 subscriber/nuttx: don't call null callback
-rw-r--r-- | src/platforms/px4_subscriber.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/platforms/px4_subscriber.h b/src/platforms/px4_subscriber.h index e995c6e49..5d0120f90 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<M>::updated()) { /* Topic not updated, do not call callback */ return; |