Check return value.

This commit is contained in:
nvt 2012-01-30 23:51:07 +01:00
parent 784ca301f8
commit 82a7c93b47

View file

@ -1193,7 +1193,9 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
PRINTF("\n"); PRINTF("\n");
} else { } else {
p = rpl_find_parent(previous_dag, from); p = rpl_find_parent(previous_dag, from);
rpl_move_parent(previous_dag, dag, p); if(p != NULL) {
rpl_move_parent(previous_dag, dag, p);
}
} }
} else { } else {
if(p->rank == dio->rank) { if(p->rank == dio->rank) {