diff options
author | James Henstridge <jamesh@src.gnome.org> | 2002-01-23 14:35:21 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2002-01-23 14:35:21 +0000 |
commit | b2ed8f414f8e6f6c2269b8ae714c66afc389e0c6 (patch) | |
tree | 0c83ba397f41305ea797bcae362b01a379101053 | |
parent | 080a3c0b0a41b1a6978583e7bfc80c471479408b (diff) | |
download | pygobject-b2ed8f414f8e6f6c2269b8ae714c66afc389e0c6.tar.gz pygobject-b2ed8f414f8e6f6c2269b8ae714c66afc389e0c6.tar.xz pygobject-b2ed8f414f8e6f6c2269b8ae714c66afc389e0c6.zip |
(add_signal_docs): only get the class for a type if it is a
classed type.
-rw-r--r-- | gobject/pygtype.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gobject/pygtype.c b/gobject/pygtype.c index bb75ca9..66b1df7 100644 --- a/gobject/pygtype.c +++ b/gobject/pygtype.c @@ -773,10 +773,11 @@ object_doc_dealloc(PyObject *self) static void add_signal_docs(GType gtype, GString *string) { - GTypeClass *class; + GTypeClass *class = NULL; guint *signal_ids, n_ids = 0, i; - class = g_type_class_ref(gtype); + if (G_TYPE_IS_CLASSED(gtype)) + class = g_type_class_ref(gtype); signal_ids = g_signal_list_ids(gtype, &n_ids); if (n_ids > 0) { @@ -808,7 +809,8 @@ add_signal_docs(GType gtype, GString *string) g_free(signal_ids); g_string_append(string, "\n"); } - g_type_class_unref(class); + if (class) + g_type_class_unref(class); } static void |