summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-03-22 12:56:15 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-03-22 12:56:15 (GMT)
commite90cdaa185edf92c069cd3daa7f975e5811ee1dc (patch)
treef56c93ca0f620df9743f130aa233a709deafd047 /Python
parenteff19a13ed4ca04e5be8c93a044952bad7de2054 (diff)
downloadcpython-e90cdaa185edf92c069cd3daa7f975e5811ee1dc.zip
cpython-e90cdaa185edf92c069cd3daa7f975e5811ee1dc.tar.gz
cpython-e90cdaa185edf92c069cd3daa7f975e5811ee1dc.tar.bz2
check for NULL
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 1ab7a1a..4c1c347 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,