Check that self->obj isn't NULL before probing its typeid in tp_traverse
This commit is contained in:
1 parent
f00dafb32b
commit
dde8a99c29
1 file changed
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user