don't blow up with bad modules
This commit is contained in:
parent
d0658b7b53
commit
66709db4bb
4
C/exec.c
4
C/exec.c
|
@ -1084,15 +1084,15 @@ static Int _user_expand_goal(USES_REGS1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int do_term_expansion(USES_REGS1) {
|
static Int do_term_expansion(USES_REGS1) {
|
||||||
yhandle_t sl = Yap_StartSlots();
|
yhandle_t sl = Yap_StartSlots();
|
||||||
Int creeping = Yap_get_signal(YAP_CREEP_SIGNAL);
|
Int creeping = Yap_get_signal(YAP_CREEP_SIGNAL);
|
||||||
PredEntry *pe;
|
PredEntry *pe;
|
||||||
Term cmod = CurrentModule, omod = cmod;
|
Term cmod = CurrentModule, omod = cmod;
|
||||||
Term mg_args[2];
|
Term mg_args[2];
|
||||||
Term g = Yap_YapStripModule(ARG1, &cmod);
|
Term g = Yap_YapStripModule(ARG1, &cmod);
|
||||||
yhandle_t h1 = Yap_InitSlot(g), h2 = Yap_InitSlot(ARG2);
|
yhandle_t h1 = Yap_InitSlot(g), h2 = Yap_InitSlot(ARG2);
|
||||||
|
|
||||||
/* user:term_expansion(A,B) */
|
/* user:term_expansion(A,B) */
|
||||||
|
|
||||||
ARG1 = g;
|
ARG1 = g;
|
||||||
if ((pe = RepPredProp(Yap_GetPredPropByFunc(FunctorTermExpansion, USER_MODULE))) &&
|
if ((pe = RepPredProp(Yap_GetPredPropByFunc(FunctorTermExpansion, USER_MODULE))) &&
|
||||||
pe->OpcodeOfPred != FAIL_OPCODE && pe->OpcodeOfPred != UNDEF_OPCODE &&
|
pe->OpcodeOfPred != FAIL_OPCODE && pe->OpcodeOfPred != UNDEF_OPCODE &&
|
||||||
|
|
Reference in New Issue