Make ContainerLayer::first_child borrow temporary

Fixes a crash in ContainerLayer::remove_child (#1778).
This commit is contained in:
Matt Brubeck 2014-04-28 10:52:39 -07:00
parent abe50544a9
commit 9f76252928

View file

@ -376,7 +376,8 @@ impl IOCompositor {
self.opts.tile_size,
self.opts.cpu_painting);
match *self.root_layer.first_child.borrow() {
let first_child = self.root_layer.first_child.borrow().clone();
match first_child {
None => {}
Some(ref old_layer) => {
ContainerLayer::remove_child(self.root_layer.clone(), old_layer.clone())