Browse Source

Check return value of PyEval_GetGlobals() for NULL

CID 486814
pull/224/head
Christian Heimes 13 years ago
parent
commit
603bd2d374
  1. 9
      Modules/pyexpat.c

9
Modules/pyexpat.c

@ -286,12 +286,17 @@ call_with_frame(PyCodeObject *c, PyObject* func, PyObject* args,
{
PyThreadState *tstate = PyThreadState_GET();
PyFrameObject *f;
PyObject *res;
PyObject *res, *globals;
if (c == NULL)
return NULL;
f = PyFrame_New(tstate, c, PyEval_GetGlobals(), NULL);
globals = PyEval_GetGlobals();
if (globals == NULL) {
return NULL;
}
f = PyFrame_New(tstate, c, globals, NULL);
if (f == NULL)
return NULL;
tstate->frame = f;

Loading…
Cancel
Save