Skip to content

Commit b30d676

Browse files
committed
Check name too
1 parent 4f22a16 commit b30d676

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Objects/exceptions.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2708,6 +2708,7 @@ AttributeError_str(PyObject *op)
27082708
PyAttributeErrorObject *self = PyAttributeErrorObject_CAST(op);
27092709
if (
27102710
self->obj
2711+
&& self->name
27112712
&& (!PyTuple_GET_SIZE(self->args)
27122713
|| (PyTuple_GET_SIZE(self->args) == 1
27132714
&& PyUnicode_Equal(PyTuple_GET_ITEM(self->args, 0), self->name))

0 commit comments

Comments
 (0)