aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/px4_subscriber.h
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-12-10 12:41:54 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-12-10 12:41:54 +0100
commite6224304606e20bbf79280978ba70326eabea575 (patch)
tree5db92fec5be018c09cba5aa8edfa91565687cc73 /src/platforms/px4_subscriber.h
parent24fd5759b5443cf198f29eb6d5eae8c80cb04fe0 (diff)
downloadpx4-firmware-e6224304606e20bbf79280978ba70326eabea575.tar.gz
px4-firmware-e6224304606e20bbf79280978ba70326eabea575.tar.bz2
px4-firmware-e6224304606e20bbf79280978ba70326eabea575.zip
px4 subscriber/nuttx: don't call null callback
Diffstat (limited to 'src/platforms/px4_subscriber.h')
-rw-r--r--src/platforms/px4_subscriber.h4
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;