Commit 2b366e41 authored by Martin v. Löwis's avatar Martin v. Löwis

Check whether there are flags.

parent ce1d5d25
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment