From 2b366e41c3eee597923263497fc3a631c049c320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 26 Feb 2006 22:12:35 +0000 Subject: Check whether there are flags. --- Python/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 3cb03dc..2a6afe2 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; -- cgit v0.12