chiark / gitweb /
key.c, pgen.c: Add missing guards for `del' to property `set' functions.
[catacomb-python] / pgen.c
diff --git a/pgen.c b/pgen.c
index 108fa31a5168c19cac5aaa03b59c8752dc6d9da5..30b78ed38f4b6828ea69577082e7c72a5dceb0c2 100644 (file)
--- a/pgen.c
+++ b/pgen.c
@@ -424,6 +424,7 @@ static int peset_x(PyObject *me, PyObject *xobj, void *hunoz)
   mp *x = 0;
   pgen_event *ev = PGEVENT_EV(me);
   int rc = -1;
   mp *x = 0;
   pgen_event *ev = PGEVENT_EV(me);
   int rc = -1;
+  if (!x) NIERR("__del__");
   PGEVENT_CHECK(me);
   if ((x = getmp(xobj)) == 0) goto end;
   mp_drop(ev->m);
   PGEVENT_CHECK(me);
   if ((x = getmp(xobj)) == 0) goto end;
   mp_drop(ev->m);