mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
Fix exec_list::move_nodes_to when the source list is empty
This commit is contained in:
parent
e29a585989
commit
acce380a3f
1 changed files with 10 additions and 6 deletions
16
list.h
16
list.h
|
|
@ -273,14 +273,18 @@ struct exec_list {
|
|||
*/
|
||||
void move_nodes_to(exec_list *target)
|
||||
{
|
||||
target->head = head;
|
||||
target->tail = NULL;
|
||||
target->tail_pred = tail_pred;
|
||||
if (is_empty()) {
|
||||
target->make_empty();
|
||||
} else {
|
||||
target->head = head;
|
||||
target->tail = NULL;
|
||||
target->tail_pred = tail_pred;
|
||||
|
||||
target->head->prev = (exec_node *) &target->head;
|
||||
target->tail_pred->next = (exec_node *) &target->tail;
|
||||
target->head->prev = (exec_node *) &target->head;
|
||||
target->tail_pred->next = (exec_node *) &target->tail;
|
||||
|
||||
make_empty();
|
||||
make_empty();
|
||||
}
|
||||
}
|
||||
|
||||
exec_list_iterator iterator()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue