[glib] gobject: remove duplicate GType sanity check
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gobject: remove duplicate GType sanity check
- Date: Sat, 8 Apr 2017 05:20:40 +0000 (UTC)
commit a83ccc535f73128fe4880d19d34375f9fdcd5113
Author: Tim-Philipp Müller <tim centricular com>
Date: Tue Apr 4 17:18:35 2017 +0100
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 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index 4363976..2bf5e6f 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]