mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
GDataSet: silently accept NULL/0 as keys
This used to be the behaviour before we made these functions threadsafe; keep it that way. https://bugzilla.gnome.org/show_bug.cgi?id=737741
This commit is contained in:
parent
e24e89bc07
commit
f6a9d04796
@ -850,7 +850,6 @@ g_datalist_id_dup_data (GData **datalist,
|
||||
GDataElt *data, *data_end;
|
||||
|
||||
g_return_val_if_fail (datalist != NULL, NULL);
|
||||
g_return_val_if_fail (key_id != 0, NULL);
|
||||
|
||||
g_datalist_lock (datalist);
|
||||
|
||||
@ -1029,7 +1028,7 @@ g_datalist_get_data (GData **datalist,
|
||||
data_end = data + d->len;
|
||||
while (data < data_end)
|
||||
{
|
||||
if (strcmp (g_quark_to_string (data->key), key) == 0)
|
||||
if (g_strcmp0 (g_quark_to_string (data->key), key) == 0)
|
||||
{
|
||||
res = data->data;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user