mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Fix collections list_pop_front bug.
* Thanks to Rocky Song for finding the bug.
This commit is contained in:
parent
36948fff45
commit
97518da1df
@ -294,7 +294,9 @@ void list_pop_front(list_t *ptr, void *data)
|
|||||||
memcpy(data, tmp->data, ptr->data_len);
|
memcpy(data, tmp->data, ptr->data_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp->next_ptr->prev_ptr = NULL;
|
if (tmp->next_ptr) {
|
||||||
|
tmp->next_ptr->prev_ptr = NULL;
|
||||||
|
}
|
||||||
ptr->head_ptr = tmp->next_ptr;
|
ptr->head_ptr = tmp->next_ptr;
|
||||||
ptr->size -= 1;
|
ptr->size -= 1;
|
||||||
xfree(tmp);
|
xfree(tmp);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user