summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/pystate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index f86f5a9..98882eb 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -592,6 +592,7 @@ PyState_RemoveModule(struct PyModuleDef* def)
Py_FatalError("PyState_RemoveModule: Module index out of bounds.");
return -1;
}
+ Py_INCREF(Py_None);
return PyList_SetItem(state->modules_by_index, index, Py_None);
}