mirror of
https://github.com/hmaxnl/netex.git
synced 2025-01-18 07:24:21 +01:00
[CHANGE] added checks in 'delete_node' function.
This commit is contained in:
parent
c3a2f00edc
commit
9c8cdcd94d
|
@ -41,8 +41,10 @@ void delete_node(list_node* node)
|
|||
{
|
||||
if (node == NULL)
|
||||
return;
|
||||
node->previous->next = node->next;
|
||||
node->next->previous = node->previous;
|
||||
if (node->previous != NULL)
|
||||
node->previous->next = node->next;
|
||||
if (node->next != NULL)
|
||||
node->next->previous = node->previous;
|
||||
free(node);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user