Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b366e4

Browse files
committed
Check whether there are flags.
1 parent ce1d5d2 commit 2b366e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/pythonrun.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ Py_CompileStringFlags(const char *str, const char *filename, int start,
12541254
PyArena_Free(arena);
12551255
return NULL;
12561256
}
1257-
if (flags->cf_flags & PyCF_ONLY_AST) {
1257+
if (flags && (flags->cf_flags & PyCF_ONLY_AST)) {
12581258
PyObject *result = PyAST_mod2obj(mod);
12591259
PyArena_Free(arena);
12601260
return result;

0 commit comments

Comments
 (0)