px4 subscriber/nuttx: don't call null callback

This commit is contained in:
Thomas Gubler 2014-12-10 12:41:54 +01:00
parent 24fd5759b5
commit e622430460
1 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,10 @@ public:
*/
void update()
{
if (_callback == nullptr) {
return;
}
if (!uORB::Subscription<M>::updated()) {
/* Topic not updated, do not call callback */
return;