check for NULL cps when adjusting.

This commit is contained in:
Vitor Santos Costa 2011-09-04 13:05:09 +02:00
parent 3f9e1c2836
commit c3ea833845

View File

@ -1216,13 +1216,16 @@ fix_tabling_info( USES_REGS1 )
while (df) {
if (DepFr_backchain_cp(df))
DepFr_backchain_cp(df) = ChoicePtrAdjust(DepFr_backchain_cp(df));
DepFr_leader_cp(df) = ChoicePtrAdjust(DepFr_leader_cp(df));
DepFr_cons_cp(df) = ConsumerChoicePtrAdjust(DepFr_cons_cp(df));
if (DepFr_leader_cp(df))
DepFr_leader_cp(df) = ChoicePtrAdjust(DepFr_leader_cp(df));
if (DepFr_cons_cp(df))
DepFr_cons_cp(df) = ConsumerChoicePtrAdjust(DepFr_cons_cp(df));
df = DepFr_next(df);
}
sg = LOCAL_top_sg_fr;
while (sg) {
SgFr_gen_cp(sg) = GeneratorChoicePtrAdjust(SgFr_gen_cp(sg));
if (SgFr_gen_cp(sg))
SgFr_gen_cp(sg) = GeneratorChoicePtrAdjust(SgFr_gen_cp(sg));
sg = SgFr_next(sg);
}
}