copy exception term early on to avoid dangling pointers.

This commit is contained in:
Vitor Santos Costa 2009-05-17 08:02:34 -07:00
parent 8e7695a42c
commit de1fb3e2c5

View File

@ -1491,7 +1491,7 @@ JumpToEnv(Term t) {
CELL *env;
choiceptr first_func = NULL, B0 = B;
if (!Yap_SetGlobalVal(AtomHandleThrow,t))
if (!(t = Yap_SetGlobalVal(AtomHandleThrow,t)))
return FALSE;
do {
/* find the first choicepoint that may be a catch */