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:
Benjamin Otte 2010-07-22 08:52:25 +02:00
parent 24161d9c46
commit a2c5bba31d

View File

@ -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;
}