Index: pygtk/pygobject.c
===================================================================
RCS file: /cvs/gnome/gnome-python/pygtk/pygobject.c,v
retrieving revision 1.14
diff -u -p -r1.14 pygobject.c
--- pygtk/pygobject.c	17 Jan 2003 15:53:42 -0000	1.14
+++ pygtk/pygobject.c	10 Feb 2003 20:05:35 -0000
@@ -298,6 +298,11 @@ pygobject_traverse(PyGObject *self, visi
     int ret = 0;
     GSList *tmp;
 
+    /* Do not cooperate in garbage collection if the GObject
+     * is referenced by another object. */
+    if (self->obj && self->obj->ref_count > 1)
+	return 0;
+
     if (self->inst_dict) ret = visit(self->inst_dict, arg);
     if (ret != 0) return ret;
 
