Bugfix: don't set the parent if the dag is NULL
This commit is contained in:
parent
08761dfd8a
commit
abb3ef9b3b
@ -135,8 +135,8 @@ rpl_set_preferred_parent(rpl_dag_t *dag, rpl_parent_t *p)
|
|||||||
* neighbor table. */
|
* neighbor table. */
|
||||||
nbr_table_unlock(rpl_parents, dag->preferred_parent);
|
nbr_table_unlock(rpl_parents, dag->preferred_parent);
|
||||||
nbr_table_lock(rpl_parents, p);
|
nbr_table_lock(rpl_parents, p);
|
||||||
|
dag->preferred_parent = p;
|
||||||
}
|
}
|
||||||
dag->preferred_parent = p;
|
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Greater-than function for the lollipop counter. */
|
/* Greater-than function for the lollipop counter. */
|
||||||
|
Loading…
Reference in New Issue
Block a user