mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
check for NULL
This commit is contained in:
parent
a4e4e35783
commit
ab79c71f39
1 changed files with 2 additions and 1 deletions
|
@ -87,7 +87,8 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, const char *filename)
|
||||||
|
|
||||||
if (s->kind == ImportFrom_kind) {
|
if (s->kind == ImportFrom_kind) {
|
||||||
PyObject *modname = s->v.ImportFrom.module;
|
PyObject *modname = s->v.ImportFrom.module;
|
||||||
if (!PyUnicode_CompareWithASCIIString(modname, "__future__")) {
|
if (modname &&
|
||||||
|
!PyUnicode_CompareWithASCIIString(modname, "__future__")) {
|
||||||
if (done) {
|
if (done) {
|
||||||
PyErr_SetString(PyExc_SyntaxError,
|
PyErr_SetString(PyExc_SyntaxError,
|
||||||
ERR_LATE_FUTURE);
|
ERR_LATE_FUTURE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue