mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 16:38:54 +02:00
Make GList more robust
g_list_delete_link was silently ignoring a NULL link before the last change. Make it do so again, since we've found callers that rely on this.
This commit is contained in:
@@ -425,6 +425,9 @@ static inline GList*
|
|||||||
_g_list_remove_link (GList *list,
|
_g_list_remove_link (GList *list,
|
||||||
GList *link)
|
GList *link)
|
||||||
{
|
{
|
||||||
|
if (link == NULL)
|
||||||
|
return list;
|
||||||
|
|
||||||
if (link->prev)
|
if (link->prev)
|
||||||
{
|
{
|
||||||
if (link->prev->next == link)
|
if (link->prev->next == link)
|
||||||
|
Reference in New Issue
Block a user