Bug squashing.
[catacomb-python] / rand.c
diff --git a/rand.c b/rand.c
index a346e12..d779846 100644 (file)
--- a/rand.c
+++ b/rand.c
@@ -888,7 +888,7 @@ static PyObject *bbsget_x(PyObject *me, void *hunoz)
 
 static int bbsset_x(PyObject *me, PyObject *val, void *hunoz)
 {
-  mp *x = 0; grand *r = GRAND_R(me); int rc = -1;
+  mp *x = 0; grand *r = GRAND_R(me); int rc = -1; if (!x) NIERR("__del__");
   if ((x = getmp(val)) == 0) goto end; r->ops->misc(r, BBS_SET, x); rc = 0;
   end: mp_drop(x); return (rc);
 }