diff --git a/libraries/AP_Radio/driver_cc2500.h b/libraries/AP_Radio/driver_cc2500.h index 702ee7e40a..2038bb2733 100644 --- a/libraries/AP_Radio/driver_cc2500.h +++ b/libraries/AP_Radio/driver_cc2500.h @@ -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();