Fix reference loss on Py_None when None is encountered in sys.modules.
This commit is contained in:
parent
a938c74751
commit
71382cb64b
|
@ -2827,6 +2827,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *given_globals,
|
|||
if (msg != NULL) {
|
||||
PyErr_SetFromImportErrorWithName(msg, abs_name);
|
||||
}
|
||||
mod = NULL;
|
||||
goto error_with_unlock;
|
||||
}
|
||||
else if (mod != NULL) {
|
||||
|
|
Loading…
Reference in New Issue