diff --git a/source/RPL/rpl_upward.c b/source/RPL/rpl_upward.c index 496313a08a37..e25c4a675f64 100644 --- a/source/RPL/rpl_upward.c +++ b/source/RPL/rpl_upward.c @@ -533,6 +533,9 @@ bool rpl_neighbour_update_dtsn(rpl_neighbour_t *neighbour, uint8_t dtsn) rpl_instance_t *rpl_neighbour_instance(const rpl_neighbour_t *neighbour) { + if (!neighbour || !neighbour->dodag_version || !neighbour->dodag_version->dodag) { + return NULL; + } return neighbour->dodag_version->dodag->instance; }