on DelListItem set prev/next to NULL on the item itself (not the list)

This commit is contained in:
Bram Matthys 2021-05-17 11:31:55 +02:00
parent d7bf35e0d9
commit 4fa468bd4f
No known key found for this signature in database
GPG key ID: BF8116B163EAAE98

View file

@ -450,6 +450,8 @@ void del_ListItem(ListStruct *item, ListStruct **list)
item->next->prev = item->prev;
if (*list == item)
*list = item->next; /* new head */
/* And update 'item', prev/next should point nowhere anymore */
item->prev = item->next = NULL;
}
/** Add item to list with a 'priority'.