From 572f2d81eb4771b86066647aff05524e63929894 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 28 Mar 2011 08:54:37 -0600 Subject: [PATCH] handle case where value has acquired more than one resource in resetFrame --- src/compiler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index 126f8a9d72..c61bd223ad 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -5554,10 +5554,8 @@ resetFrame(Context* c, Event* e) clearSites(c, el.value); } - for (Resource* r = c->acquiredResources; r;) { - Resource* next = r->nextAcquired; - clearSites(c, r->value); - r = next; + while (c->acquiredResources) { + clearSites(c, c->acquiredResources->value); } }