Merge branch 'feature/gresource-static-validate-args' into 'main'

gio/gresource: validate args of g_static_resource_init

Closes #3517

See merge request GNOME/glib!4372
This commit is contained in:
Philip Withnall 2024-11-19 18:10:18 +00:00
commit ccee4c2342

View File

@ -1529,6 +1529,10 @@ g_static_resource_init (GStaticResource *static_resource)
{
GStaticResource *next;
g_return_if_fail (static_resource != NULL);
g_return_if_fail (static_resource->next == NULL);
g_return_if_fail (static_resource != g_atomic_pointer_get (&lazy_register_resources));
do
{
next = g_atomic_pointer_get (&lazy_register_resources);