Commit f8758dc2 authored by Guido van Rossum's avatar Guido van Rossum

In PySys_GetObject(), it's possible that tstate->interp->sysdict is

NULL.  In that case, return NULL rather than dumping core.

This fixes PR#91, submitted by Lele Gaifax.
parent c71cb945
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment