summaryrefslogtreecommitdiffstats
path: root/gobject/pygboxed.c
diff options
context:
space:
mode:
Diffstat (limited to 'gobject/pygboxed.c')
-rw-r--r--gobject/pygboxed.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gobject/pygboxed.c b/gobject/pygboxed.c
index 1233b01..87695eb 100644
--- a/gobject/pygboxed.c
+++ b/gobject/pygboxed.c
@@ -185,12 +185,8 @@ pyg_boxed_new(GType boxed_type, gpointer boxed, gboolean copy_boxed,
tp = g_type_get_qdata(boxed_type, pygboxed_type_key);
- if (tp == NULL) {
+ if (!tp)
tp = (PyTypeObject *)pygi_type_import_by_g_type(boxed_type);
- if (tp == NULL) {
- PyErr_Clear();
- }
- }
if (!tp)
tp = (PyTypeObject *)&PyGBoxed_Type; /* fallback */