commit | be2033697f8b9b44656965888d0533bf6d0a8499 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Oct 05 22:17:41 1999 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Oct 05 22:17:41 1999 +0000 |
tree | 487d39cb6f51574176800c20993dc586f74f6bca | |
parent | caf2f8e3c71cad510852939d425581acbff6317b [diff] |
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.
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 @@ { PyThreadState *tstate = PyThreadState_Get(); PyObject *sd = tstate->interp->sysdict; + if (sd == NULL) + return NULL; return PyDict_GetItemString(sd, name); }