Check that self->obj isn't NULL before probing its typeid in tp_traverse

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2007-08-23 17:38:17 +01:00
1 parent f00dafb32b
commit dde8a99c29
1 file changed
+1 -1
+1 -1
View File
@@ -624,7 +624,7 @@ static void
visit_self = ''
else:
visit_self = '''
if (typeid(*self->obj) == typeid(%s))
if (self->obj && typeid(*self->obj) == typeid(%s))
Py_VISIT(self);
''' % self.helper_class.name