Browse Source

AP_IOMCU: fixed crash with BRD_IO_ENABLE=0

mission-4.1.18
Andrew Tridgell 7 years ago
parent
commit
320ada2002
  1. 4
      libraries/AP_IOMCU/AP_IOMCU.cpp

4
libraries/AP_IOMCU/AP_IOMCU.cpp

@ -444,7 +444,9 @@ void AP_IOMCU::print_debug(void) @@ -444,7 +444,9 @@ void AP_IOMCU::print_debug(void)
// trigger an ioevent
void AP_IOMCU::trigger_event(uint8_t event)
{
chEvtSignal(thread_ctx, EVENT_MASK(event));
if (thread_ctx != nullptr) {
chEvtSignal(thread_ctx, EVENT_MASK(event));
}
}
// get state of safety switch

Loading…
Cancel
Save