summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 5a066a5..a7a5933 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -64,6 +64,8 @@ PySys_GetObject(name)
{
PyThreadState *tstate = PyThreadState_Get();
PyObject *sd = tstate->interp->sysdict;
+ if (sd == NULL)
+ return NULL;
return PyDict_GetItemString(sd, name);
}