Skip to content

Commit eb5cb1c

Browse files
authored
Update Objects/stringlib/join.h
1 parent 9e43c18 commit eb5cb1c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Objects/stringlib/join.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ STRINGLIB(bytes_join)(PyObject *sep, PyObject *iterable)
8181
* races anyway, but this is a conservative approach that avoids
8282
* changing the behaviour of that data race.
8383
*/
84-
if (!PyBytes_CheckExact(buffers[i].obj)) {
84+
PyObject *bufobj = buffers[i].obj;
85+
if (!bufobj || !PyBytes_CheckExact(bufobj)) {
8586
drop_gil = 0;
8687
}
8788
}

0 commit comments

Comments
 (0)