From: Benjamin Peterson Date: Thu, 22 Mar 2012 12:56:15 +0000 (-0400) Subject: check for NULL X-Git-Tag: v3.3.0a2~91^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab79c71f39485d7ddc058dfc3a9c3d02ec859c36;p=thirdparty%2FPython%2Fcpython.git check for NULL --- diff --git a/Python/future.c b/Python/future.c index 978dc253065b..89592e22242e 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);