diff Python/pythonrun.c @ 36662:2ab9270ef19a legacy-trunk

Check whether there are flags.
author Martin v. Löwis <martin@v.loewis.de>
date Sun, 26 Feb 2006 22:12:35 +0000
parents 3c0b26113df6
children bbf16fd024df
line wrap: on
line diff
--- a/Python/pythonrun.c	Sun Feb 26 20:51:25 2006 +0000
+++ b/Python/pythonrun.c	Sun Feb 26 22:12:35 2006 +0000
@@ -1254,7 +1254,7 @@
                 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;