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:
Tim-Philipp Müller 2017-04-04 17:18:35 +01:00 committed by Matthias Clasen
parent a5b58da6bf
commit a83ccc535f

View File

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