uORB: Subscription check if uORB::Manager instance is valid

- this is necessary if uORB::Subscription is used with static storage
duration
This commit is contained in:
Daniel Agar
2021-06-16 20:44:21 -04:00
committed by Beat Küng
parent a728431e43
commit 500c45e798
+1 -2
View File
@@ -49,8 +49,7 @@ bool Subscription::subscribe()
return true; return true;
} }
if (_orb_id != ORB_ID::INVALID) { if ((_orb_id != ORB_ID::INVALID) && uORB::Manager::get_instance()) {
DeviceMaster *device_master = uORB::Manager::get_instance()->get_device_master(); DeviceMaster *device_master = uORB::Manager::get_instance()->get_device_master();
if (device_master != nullptr) { if (device_master != nullptr) {