summaryrefslogtreecommitdiffstats
path: root/gobject/pygpointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gobject/pygpointer.c')
-rw-r--r--gobject/pygpointer.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gobject/pygpointer.c b/gobject/pygpointer.c
index 449b80c..5f6417f 100644
--- a/gobject/pygpointer.c
+++ b/gobject/pygpointer.c
@@ -159,12 +159,8 @@ pyg_pointer_new(GType pointer_type, gpointer pointer)
tp = g_type_get_qdata(pointer_type, pygpointer_class_key);
- if (tp == NULL) {
+ if (!tp)
tp = (PyTypeObject *)pygi_type_import_by_g_type(pointer_type);
- if (tp == NULL) {
- PyErr_Clear();
- }
- }
if (!tp)
tp = (PyTypeObject *)&PyGPointer_Type; /* fallback */