Bug 488272 - Crash [@ RebindLets] (r=mrbkap).

This commit is contained in:
Brendan Eich 2009-04-14 17:52:13 -07:00
parent 898204a579
commit 8f9886f858

View File

@ -4109,10 +4109,12 @@ RebindLets(JSParseNode *pn, JSTreeContext *tc)
ForgetUse(pn);
JSAtomListElement *ale = tc->decls.lookup(pn->pn_atom);
while ((ale = ALE_NEXT(ale)) != NULL) {
if (ALE_ATOM(ale) == pn->pn_atom) {
LinkUseToDef(pn, ALE_DEFN(ale), tc);
return true;
if (ale) {
while ((ale = ALE_NEXT(ale)) != NULL) {
if (ALE_ATOM(ale) == pn->pn_atom) {
LinkUseToDef(pn, ALE_DEFN(ale), tc);
return true;
}
}
}