Check whether there are flags.

This commit is contained in:
Martin v. Löwis 2006-02-26 22:12:35 +00:00
parent ce1d5d2527
commit 2b366e41c3
1 changed files with 1 additions and 1 deletions

View File

@ -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;