Skip to content

Commit

Permalink
handle case of deleted pipeline when preparing to send load_end const…
Browse files Browse the repository at this point in the history
…ellation msg
  • Loading branch information
Mike Blumenkrantz committed May 27, 2015
1 parent 45116dc commit fcf4495
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/compositing/constellation.rs
Expand Up @@ -666,8 +666,8 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
}

fn handle_load_start_msg(&mut self, pipeline_id: &PipelineId) {
let mut back = false;
let mut forward = false;
let mut back;
let mut forward;
let frameid = self.pipeline_to_frame_map.get(pipeline_id);
match frameid {
Some(frame_id) => {
Expand All @@ -676,13 +676,16 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
back = if !self.frame(*frame_id).prev.is_empty() { true }
else { false };
},
None => {}
None => return
};
self.compositor_proxy.send(CompositorMsg::LoadStart(back, forward));
}

fn handle_load_complete_msg(&mut self, pipeline_id: &PipelineId) {
let frame_id = *self.pipeline_to_frame_map.get(pipeline_id).unwrap();
let frame_id = match self.pipeline_to_frame_map.get(pipeline_id) {
Some(frame) => *frame,
None => return
};

let forward = !self.mut_frame(frame_id).next.is_empty();
let back = !self.mut_frame(frame_id).prev.is_empty();
Expand Down

0 comments on commit fcf4495

Please sign in to comment.