summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2014-01-04 16:07:44 -0800
committerSimon Feltman <sfeltman@src.gnome.org>2014-01-04 16:07:44 -0800
commit64f15961b637a7e1388bd8d2cd08f04fa20e4de4 (patch)
tree0f4213b66e1f8ce1aafd7bb644c0ab284a22cb91
parent07abf8343bbeac6f36d370ced654fa6506b22175 (diff)
downloadpygobject-64f15961b637a7e1388bd8d2cd08f04fa20e4de4.tar.gz
Fix crash in error handling when creating struct with mismatched info type
Error handling code was attempting to get the PyType of a pointer to a pointer. Use the correct amount of indirection so an exception is raised as intended rather than a segfault.
-rw-r--r--gi/pygi-info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index 5ef31459..af893ec6 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -509,7 +509,7 @@ _pygi_object_get_gi_info (PyObject *object,
}
if (!PyObject_TypeCheck (py_info, type)) {
PyErr_Format (PyExc_TypeError, "attribute '__info__' must be %s, not %s",
- type->tp_name, Py_TYPE(&py_info)->tp_name);
+ type->tp_name, Py_TYPE(py_info)->tp_name);
goto out;
}