mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
gobject: Don't thaw excessively
We need to match the conditions in g_object_init for when we already have a freeze. Without that, we underflow the freeze count and trigger a warning. Fixes: #2666
This commit is contained in:
parent
12152788f9
commit
98bd4eabf2
@ -2128,7 +2128,7 @@ g_object_new_with_custom_constructor (GObjectClass *class,
|
|||||||
/* Remember: if it was newly_constructed then g_object_init()
|
/* Remember: if it was newly_constructed then g_object_init()
|
||||||
* already did a freeze, so we now have two. Release one.
|
* already did a freeze, so we now have two. Release one.
|
||||||
*/
|
*/
|
||||||
if (newly_constructed)
|
if (newly_constructed && CLASS_HAS_NOTIFY (class))
|
||||||
g_object_notify_queue_thaw (object, nqueue);
|
g_object_notify_queue_thaw (object, nqueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user