Skip to content

Commit 5a7a4f2

Browse files
committed
Fix __lazy_import__ crash
1 parent 645f5c4 commit 5a7a4f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Python/import.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4501,6 +4501,9 @@ _PyImport_LazyImportModuleLevelObject(PyThreadState *tstate,
45014501
assert(!PyErr_Occurred());
45024502
modname = Py_NewRef(Py_None);
45034503
}
4504+
if (fromlist == NULL) {
4505+
fromlist = Py_NewRef(Py_None);
4506+
}
45044507
PyObject *args[] = {modname, name, fromlist};
45054508
PyObject *res = PyObject_Vectorcall(filter, args, 3, NULL);
45064509

0 commit comments

Comments
 (0)