Bugfix: don't set the parent if the dag is NULL

This commit is contained in:
Adam Dunkels 2013-08-12 00:01:07 +02:00 committed by Simon Duquennoy
parent 08761dfd8a
commit abb3ef9b3b

View file

@ -135,9 +135,9 @@ rpl_set_preferred_parent(rpl_dag_t *dag, rpl_parent_t *p)
* neighbor table. */
nbr_table_unlock(rpl_parents, dag->preferred_parent);
nbr_table_lock(rpl_parents, p);
}
dag->preferred_parent = p;
}
}
/*---------------------------------------------------------------------------*/
/* Greater-than function for the lollipop counter. */
/*---------------------------------------------------------------------------*/