mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
notify: Emit a g_critical() instead g_return_if_fail()ing
This does not change the code semantically in any way but avoids a return in the middle of the code. https://bugzilla.gnome.org/show_bug.cgi?id=166020
This commit is contained in:
parent
24161d9c46
commit
a2c5bba31d
@ -75,8 +75,13 @@ g_object_notify_queue_freeze (GObject *object,
|
||||
nqueue, g_object_notify_queue_free);
|
||||
}
|
||||
|
||||
g_return_val_if_fail (nqueue->freeze_count < 65535, nqueue);
|
||||
nqueue->freeze_count++;
|
||||
if (nqueue->freeze_count >= 65535)
|
||||
g_critical("Free queue for %s (%p) is larger than 65535,"
|
||||
" called g_object_freeze_notify() too often."
|
||||
" Forgot to call g_object_thaw_notify() or infinite loop",
|
||||
G_OBJECT_TYPE_NAME (object), object);
|
||||
else
|
||||
nqueue->freeze_count++;
|
||||
|
||||
return nqueue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user