We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4f1cc8 commit 0f6b7b7Copy full SHA for 0f6b7b7
1 file changed
Python/import.c
@@ -2447,6 +2447,11 @@ PyObject*
2447
PyImport_CreateModuleFromInitfunc(
2448
PyObject *spec, PyObject* (*initfunc)(void))
2449
{
2450
+ if (initfunc == NULL) {
2451
+ PyErr_BadInternalCall();
2452
+ return NULL;
2453
+ }
2454
+
2455
PyThreadState *tstate = _PyThreadState_GET();
2456
2457
PyObject *name = PyObject_GetAttr(spec, &_Py_ID(name));
0 commit comments