mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
gdataset: check arguments of g_datalist_id_update_atomic()
g_datalist_id_update_atomic() is internal API only, and all callers (supposedly) get this right. Add assertions for these requirements.
This commit is contained in:
@@ -1098,6 +1098,9 @@ g_datalist_id_update_atomic (GData **datalist,
|
||||
GDestroyNotify new_destroy;
|
||||
guint32 idx;
|
||||
|
||||
g_return_val_if_fail (datalist, NULL);
|
||||
g_return_val_if_fail (key_id != 0, NULL);
|
||||
|
||||
d = g_datalist_lock_and_get (datalist);
|
||||
|
||||
data = datalist_find (d, key_id, &idx);
|
||||
|
Reference in New Issue
Block a user