mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Radio: prevent crash if cc2500 device not found
This commit is contained in:
parent
9f53ae1ea4
commit
907728e323
@ -155,7 +155,7 @@ public:
|
||||
bool Reset(void);
|
||||
|
||||
bool lock_bus(void) {
|
||||
return dev->get_semaphore()->take(HAL_SEMAPHORE_BLOCK_FOREVER);
|
||||
return dev && dev->get_semaphore()->take(HAL_SEMAPHORE_BLOCK_FOREVER);
|
||||
}
|
||||
void unlock_bus(void) {
|
||||
dev->get_semaphore()->give();
|
||||
|
Loading…
Reference in New Issue
Block a user