summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-02-26 22:12:35 +0000
committerMartin v. Löwis <martin@v.loewis.de>2006-02-26 22:12:35 +0000
commitece3f3631b9e3f8e62dc387b918c3d505147ef42 (patch)
treedb1509a2ab559585c812c3b1320a7ab6ab5d4692 /Python/pythonrun.c
parent7e0dc7ed8183c5679e6774c742980201aea9449f (diff)
downloadcpython-ece3f3631b9e3f8e62dc387b918c3d505147ef42.tar.gz
Check whether there are flags.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
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;