From: Martin v. Löwis Date: Sun, 26 Feb 2006 22:12:35 +0000 (+0000) Subject: Check whether there are flags. X-Git-Tag: v2.5a0~537 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b366e41c3eee597923263497fc3a631c049c320;p=thirdparty%2FPython%2Fcpython.git Check whether there are flags. --- diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 3cb03dc362b0..2a6afe24a4a0 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;