summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/_pickle.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index f9aa043..b63a7d9 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -2940,6 +2940,9 @@ save_frozenset(PicklerObject *self, PyObject *obj)
return -1;
iter = PyObject_GetIter(obj);
+ if (iter == NULL) {
+ return NULL;
+ }
for (;;) {
PyObject *item;