From 91b3e4359de17b7e90275662bb2be8fb604e7b21 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 1 May 2009 12:09:22 -0500 Subject: [PATCH] handle tabling errors where CP->AP==NULL --- C/errors.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C/errors.c b/C/errors.c index 2b63d47cf..7cdd9bff3 100644 --- a/C/errors.c +++ b/C/errors.c @@ -322,7 +322,8 @@ dump_stack(void) env_ptr = (CELL *)(env_ptr[E_E]); } if (b_ptr) { - if (b_ptr->cp_ap->opc != Yap_opcode(_or_else) && + if (b_ptr->cp_ap && /* tabling */ + b_ptr->cp_ap->opc != Yap_opcode(_or_else) && b_ptr->cp_ap->opc != Yap_opcode(_or_last) && b_ptr->cp_ap->opc != Yap_opcode(_Nstop)) { /* we can safely ignore ; because there is always an upper env */