From d77a07388f9acd1d45533d37544b09de98e4f36d Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Fri, 20 Sep 2013 22:43:45 -0400 Subject: [PATCH] exit the correct evicted pipelines --- src/components/main/constellation.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/main/constellation.rs b/src/components/main/constellation.rs index 07b9601d641..bdb07af747a 100644 --- a/src/components/main/constellation.rs +++ b/src/components/main/constellation.rs @@ -770,12 +770,13 @@ impl Constellation { match navigation_type { constellation_msg::Load => { let evicted = self.navigation_context.load(frame_tree); + let mut exited = HashSet::new(); + // exit any pipelines that don't exist outside the evicted frame trees for frame_tree in evicted.iter() { - // exit any pipelines that don't exist outside the evicted frame trees - for frame in frame_tree.iter() { - if !self.navigation_context.contains(frame.pipeline.id) { - frame_tree.pipeline.exit(); - self.pipelines.remove(&frame_tree.pipeline.id); + for @FrameTree { pipeline, _ } in frame_tree.iter() { + if !self.navigation_context.contains(pipeline.id) { + pipeline.exit(); + self.pipelines.remove(&pipeline.id); } } }