1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

pkg/semtech_loramac: add null guards to radio_events descriptor

This commit is contained in:
Jose Alamos 2019-03-07 17:25:06 +01:00
parent ed5bd8e13e
commit ee93796975

View File

@ -630,12 +630,18 @@ static void _semtech_loramac_event_cb(netdev_t *dev, netdev_event_t event)
case NETDEV_EVENT_FHSS_CHANGE_CHANNEL:
DEBUG("[semtech-loramac] FHSS channel change\n");
semtech_loramac_radio_events.FhssChangeChannel(((sx127x_t *)dev)->_internal.last_channel);
if(semtech_loramac_radio_events.FhssChangeChannel) {
semtech_loramac_radio_events.FhssChangeChannel((
(sx127x_t *)dev)->_internal.last_channel);
}
break;
case NETDEV_EVENT_CAD_DONE:
DEBUG("[semtech-loramac] test: CAD done\n");
semtech_loramac_radio_events.CadDone(((sx127x_t *)dev)->_internal.is_last_cad_success);
if(semtech_loramac_radio_events.CadDone) {
semtech_loramac_radio_events.CadDone((
(sx127x_t *)dev)->_internal.is_last_cad_success);
}
break;
default: