forked from Archive/PX4-Autopilot
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:
parent
a728431e43
commit
500c45e798
|
@ -49,8 +49,7 @@ bool Subscription::subscribe()
|
|||
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();
|
||||
|
||||
if (device_master != nullptr) {
|
||||
|
|
Loading…
Reference in New Issue