Commit 603bd2d3 authored by Christian Heimes's avatar Christian Heimes

Check return value of PyEval_GetGlobals() for NULL

CID 486814
parents 5df8ff01 a6404ad4
......@@ -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;
......
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