> Where is the bugzilla URL and how do I say this in bugzilla speak:
> 
> "Why does checking to see if a GtkTreeItem is a subtree 
>  (with item.subtree != None) result in a segfault?"

Here is a a version of the _wrap_gtk_tree_item_get_subtree source
that "fixes" my problem.
Remove foo and use return PyGtk_New( (GtkObject *) GTK_TREE_ITEM...
to simulate the old behavior.
PyGtk_New was getting passed a NULL pointer.

static PyObject *_wrap_gtk_tree_item_get_subtree(PyObject *self, PyObject *args) {
    PyObject *obj;
    GtkObject *foo;

    if (!PyArg_ParseTuple(args, "O!:gtk_tree_item_get_subtree", &PyGtk_Type, &obj))
        return NULL;

    foo = (GtkObject *) GTK_TREE_ITEM(PyGtk_Get(obj))->subtree;
    if (foo == NULL) {
        Py_INCREF(Py_None);
        return Py_None;
    }
    return PyGtk_New(foo);
}

-- 
Jon Nelson                \|/ ____ \|/   Gort,
[EMAIL PROTECTED]    "@'/ ,. \`@"   Klaatu
C and Python Programmer   /_| \__/ |_\   barada
Motorcycle Enthusiast        \__U_/      nikto.
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to