summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/future.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c
index 1ab7a1a104..4c1c347053 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -86,7 +86,7 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, const char *filename)
if (s->kind == ImportFrom_kind) {
PyObject *modname = s->v.ImportFrom.module;
- if (PyString_GET_SIZE(modname) == 10 &&
+ if (modname && PyString_GET_SIZE(modname) == 10 &&
!strcmp(PyString_AS_STRING(modname), "__future__")) {
if (done) {
PyErr_SetString(PyExc_SyntaxError,