Avoid accessing DOM global from VRDisplay's destructor.

This commit is contained in:
Josh Matthews 2019-12-19 18:14:05 -05:00
parent 2e6252f256
commit fda0572a93
6 changed files with 27 additions and 28 deletions

View file

@ -364,7 +364,7 @@ impl XRSystem {
existing.update_display(&display);
existing
} else {
let root = VRDisplay::new(&self.global(), display.clone());
let root = VRDisplay::new(&self.global().as_window(), display.clone());
self.displays.borrow_mut().push(Dom::from_ref(&*root));
root
}