handle tabling errors where CP->AP==NULL

This commit is contained in:
Vitor Santos Costa 2009-05-01 12:09:22 -05:00
parent 8275f2232c
commit 91b3e4359d
1 changed files with 2 additions and 1 deletions

View File

@ -322,7 +322,8 @@ dump_stack(void)
env_ptr = (CELL *)(env_ptr[E_E]); env_ptr = (CELL *)(env_ptr[E_E]);
} }
if (b_ptr) { 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(_or_last) &&
b_ptr->cp_ap->opc != Yap_opcode(_Nstop)) { b_ptr->cp_ap->opc != Yap_opcode(_Nstop)) {
/* we can safely ignore ; because there is always an upper env */ /* we can safely ignore ; because there is always an upper env */