From 00fdd08bc1160510d8ed3d7a2d82bdd88e148a47 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 27 Feb 2019 17:04:28 -0800 Subject: Check flags isn't NULL before dereferencing (this broke regen-importlib) --- Python/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index b763c99da0..199ea82434 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1200,7 +1200,7 @@ PyParser_ASTFromStringObject(const char *s, PyObject *filename, int start, PyCompilerFlags localflags; perrdetail err; int iflags = PARSER_FLAGS(flags); - if (flags->cf_feature_version < 7) + if (flags && flags->cf_feature_version < 7) iflags |= PyPARSE_ASYNC_HACKS; node *n = PyParser_ParseStringObject(s, filename, -- cgit v1.2.1