gio/gresource: validate args of g_static_resource_init

Signed-off-by: Sebastian Geiger <sbastig@gmx.net>
This commit is contained in:
Sebastian Geiger 2024-10-28 08:53:12 +01:00
parent a85cc64b4b
commit ccf4403e39

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);