diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-03-22 08:56:15 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-03-22 08:56:15 -0400 |
commit | e90cdaa185edf92c069cd3daa7f975e5811ee1dc (patch) | |
tree | f56c93ca0f620df9743f130aa233a709deafd047 /Python | |
parent | eff19a13ed4ca04e5be8c93a044952bad7de2054 (diff) | |
download | cpython-git-e90cdaa185edf92c069cd3daa7f975e5811ee1dc.tar.gz |
check for NULL
Diffstat (limited to 'Python')
-rw-r--r-- | Python/future.c | 2 |
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, |