mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-12 11:33:02 +01:00
GVariant: lock before freeing, to avoid assert
This commit is contained in:
@@ -595,6 +595,8 @@ g_variant_unref (GVariant *value)
|
|||||||
g_critical ("attempting to free a locked GVariant instance. "
|
g_critical ("attempting to free a locked GVariant instance. "
|
||||||
"This should never happen.");
|
"This should never happen.");
|
||||||
|
|
||||||
|
value->state |= STATE_LOCKED;
|
||||||
|
|
||||||
g_variant_type_info_unref (value->type_info);
|
g_variant_type_info_unref (value->type_info);
|
||||||
|
|
||||||
if (value->state & STATE_SERIALISED)
|
if (value->state & STATE_SERIALISED)
|
||||||
|
|||||||
Reference in New Issue
Block a user