diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/importdl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/importdl.c b/Python/importdl.c index 942e4b8..e393de1 100644 --- a/Python/importdl.c +++ b/Python/importdl.c @@ -97,6 +97,8 @@ _PyImport_LoadDynamicModule(PyObject *name, PyObject *path, FILE *fp) /* Remember pointer to module init function. */ def = PyModule_GetDef(m); + if (def == NULL) + goto error; def->m_base.m_init = p; /* Remember the filename as the __file__ attribute */ |