diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-03-22 12:56:15 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-03-22 12:56:15 (GMT) |
commit | ab79c71f39485d7ddc058dfc3a9c3d02ec859c36 (patch) | |
tree | 5bed950190176f367078e3ddd3757a38d133466a /Python/future.c | |
parent | a4e4e35783d26151be19253ff6dd1c3ec2ca7efa (diff) | |
download | cpython-ab79c71f39485d7ddc058dfc3a9c3d02ec859c36.zip cpython-ab79c71f39485d7ddc058dfc3a9c3d02ec859c36.tar.gz cpython-ab79c71f39485d7ddc058dfc3a9c3d02ec859c36.tar.bz2 |
check for NULL
Diffstat (limited to 'Python/future.c')
-rw-r--r-- | Python/future.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c index 978dc25..89592e2 100644 --- a/Python/future.c +++ b/Python/future.c @@ -87,7 +87,8 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, const char *filename) if (s->kind == ImportFrom_kind) { PyObject *modname = s->v.ImportFrom.module; - if (!PyUnicode_CompareWithASCIIString(modname, "__future__")) { + if (modname && + !PyUnicode_CompareWithASCIIString(modname, "__future__")) { if (done) { PyErr_SetString(PyExc_SyntaxError, ERR_LATE_FUTURE); |