mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
gobject: remove duplicate GType sanity check
This is going to be checked again by g_object_new_with_properties() and g_object_new_valist() anyway, so might just as well leave it to those functions to do the check and only do it once. It doesn't matter which function emits the critical warning in the end either, as one has to look at a stack trace to find out what code triggered it in any case. https://bugzilla.gnome.org/show_bug.cgi?id=780908
This commit is contained in:
parent
a5b58da6bf
commit
a83ccc535f
@ -1616,8 +1616,6 @@ g_object_new (GType object_type,
|
||||
GObject *object;
|
||||
va_list var_args;
|
||||
|
||||
g_return_val_if_fail (G_TYPE_IS_OBJECT (object_type), NULL);
|
||||
|
||||
/* short circuit for calls supplying no properties */
|
||||
if (!first_property_name)
|
||||
return g_object_new_with_properties (object_type, 0, NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user