From d8cbc6684b138b2165d6dd19e4a99b12475017c3 Mon Sep 17 00:00:00 2001 From: paul Jewell Date: Fri, 30 Sep 2016 23:24:09 +0200 Subject: [PATCH] LP-423 - Modified IRQHandler --- flight/pios/common/pios_hmc5x83.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flight/pios/common/pios_hmc5x83.c b/flight/pios/common/pios_hmc5x83.c index 098843844..5962395c1 100644 --- a/flight/pios/common/pios_hmc5x83.c +++ b/flight/pios/common/pios_hmc5x83.c @@ -539,6 +539,9 @@ int32_t PIOS_HMC5x83_Test(pios_hmc5x83_dev_t handler) */ bool PIOS_HMC5x83_IRQHandler(pios_hmc5x83_dev_t handler) { + if (!handler) { // handler is not set on first call + return false; + } pios_hmc5x83_dev_data_t *dev = dev_validate(handler); dev->data_ready = true;