From 82a7c93b47926d61f390f53bacd3ec9528362315 Mon Sep 17 00:00:00 2001 From: nvt Date: Mon, 30 Jan 2012 23:51:07 +0100 Subject: [PATCH] Check return value. --- core/net/rpl/rpl-dag.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/net/rpl/rpl-dag.c b/core/net/rpl/rpl-dag.c index 2ec8cab0a..6bea3d46d 100755 --- a/core/net/rpl/rpl-dag.c +++ b/core/net/rpl/rpl-dag.c @@ -1193,7 +1193,9 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio) PRINTF("\n"); } else { 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 { if(p->rank == dio->rank) {