ecl_unrecoverable_error() verifies that some frame was established before jumping to it.

This commit is contained in:
Juan Jose Garcia Ripoll 2012-04-08 16:17:50 +02:00
parent 9825171f42
commit 8d1c35daeb

View file

@ -91,8 +91,12 @@ ecl_unrecoverable_error(cl_env_ptr the_env, const char *message)
ecl_unwind(the_env, destination);
}
}
destination = ecl_process_env()->frs_org;
ecl_unwind(the_env, destination);
if (the_env->frs_org <= the_env->frs_top) {
destination = ecl_process_env()->frs_org;
ecl_unwind(the_env, destination);
} else {
ecl_internal_error("\n;;;\n;;; No frame to jump to\n;;; Aborting ECL\n;;;");
}
}
/*****************************************************************************/