aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;