]> granicus.if.org Git - python/commitdiff
Check whether there are flags.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 26 Feb 2006 22:12:35 +0000 (22:12 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 26 Feb 2006 22:12:35 +0000 (22:12 +0000)
Python/pythonrun.c

index 3cb03dc362b066d4065c000c8ce43b268b33601b..2a6afe24a4a09b91830bb39844947c227c82cd00 100644 (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;