chiark / gitweb /
math/pgen.c: Don't free the tester if it's not set up.
[catacomb] / math / pgen.c
index 9a822f57e7e3d6604c1eb16adaba6a8b055c8006..84185e3390f52e5088fd14d37745ae979ebff981 100644 (file)
@@ -283,7 +283,7 @@ mp *pgen(const char *name, mp *d, mp *m, pgen_proc *event, void *ectx,
       rc = PGEN_ABORT;
       if (!(act & A_DONE)) {
        act |= A_ENDSTEP | A_DONE;
-       if (p == P_TEST)
+       if (p == P_TEST && rq != PGEN_BEGIN)
          act |= A_ENDTEST;
       }
     }