diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pythonrun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 3cb03dc362..2a6afe24a4 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1254,7 +1254,7 @@ Py_CompileStringFlags(const char *str, const char *filename, int start, PyArena_Free(arena); return NULL; } - if (flags->cf_flags & PyCF_ONLY_AST) { + if (flags && (flags->cf_flags & PyCF_ONLY_AST)) { PyObject *result = PyAST_mod2obj(mod); PyArena_Free(arena); return result; |