From a83ccc535f73128fe4880d19d34375f9fdcd5113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 4 Apr 2017 17:18:35 +0100 Subject: [PATCH] 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 --- gobject/gobject.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/gobject/gobject.c b/gobject/gobject.c index 436397654..2bf5e6ff7 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -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);