[glib/fix-freeze-count-underflow: 23/23] gobject: Don't thaw excessively
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/fix-freeze-count-underflow: 23/23] gobject: Don't thaw excessively
- Date: Fri, 10 Jun 2022 13:09:12 +0000 (UTC)
commit 98bd4eabf28474ff0af35c8d63064a59a782c371
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jun 8 13:29:38 2022 -0400
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
gobject/gobject.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index f19c40180e..e71547c19a 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -2128,7 +2128,7 @@ g_object_new_with_custom_constructor (GObjectClass *class,
/* Remember: if it was newly_constructed then g_object_init()
* 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]