Skip to content
Permalink
Browse files

handle case of deleted pipeline when preparing to send load_end const…

…ellation msg
  • Loading branch information
Mike Blumenkrantz
Mike Blumenkrantz committed May 27, 2015
1 parent 45116dc commit fcf449517ddff5d1b74f284c8c27166e105b9611
Showing with 7 additions and 4 deletions.
  1. +7 −4 components/compositing/constellation.rs
@@ -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) => {
@@ -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();

0 comments on commit fcf4495

Please sign in to comment.
You can’t perform that action at this time.