mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-20 11:49:07 +08:00
px4 subscriber/nuttx: don't call null callback
This commit is contained in:
parent
24fd5759b5
commit
e622430460
@ -115,6 +115,10 @@ public:
|
||||
*/
|
||||
void update()
|
||||
{
|
||||
if (_callback == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!uORB::Subscription<M>::updated()) {
|
||||
/* Topic not updated, do not call callback */
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user