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
1 changed files with 1 additions and 1 deletions

View File

@ -135,8 +135,8 @@ 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;
}
dag->preferred_parent = p;
}
/*---------------------------------------------------------------------------*/
/* Greater-than function for the lollipop counter. */