diff --git a/Python/traceback.c b/Python/traceback.c index 9418236abbf..61e6838e17e 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -605,7 +605,7 @@ extract_anchors_from_line(PyObject *filename, PyObject *line, } const char *segment_str = PyUnicode_AsUTF8(segment); - if (!segment) { + if (!segment_str) { goto done; }