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