]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43950: check against the raw string, not the pyobject (GH-27337)
authorBatuhan Taskaya <batuhan@python.org>
Sat, 24 Jul 2021 17:49:17 +0000 (20:49 +0300)
committerGitHub <noreply@github.com>
Sat, 24 Jul 2021 17:49:17 +0000 (20:49 +0300)
Python/traceback.c

index 9418236abbf51858e2d481a6bb21721df3bf2dd2..61e6838e17e4191a8eee5e25853e400b3d8e4f6e 100644 (file)
@@ -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;
     }