summaryrefslogtreecommitdiff
path: root/Objects/genobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r--Objects/genobject.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c
index e55cfd21c6..453b100330 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -1128,6 +1128,9 @@ compute_cr_origin(int origin_depth)
/* Now collect them */
PyObject *cr_origin = PyTuple_New(frame_count);
+ if (cr_origin == NULL) {
+ return NULL;
+ }
frame = PyEval_GetFrame();
for (int i = 0; i < frame_count; ++i) {
PyObject *frameinfo = Py_BuildValue(