Avoid crashing if entered surface's window is not a known window
Not sure how this even happens, but should fix #88
This commit is contained in:
parent
94da1af753
commit
b699ce62a1
1 changed files with 1 additions and 5 deletions
|
|
@ -127,11 +127,7 @@ impl SurfaceData {
|
|||
self.output_key = Some(key);
|
||||
debug!("{} entered {}", self.server.id(), output.server.id());
|
||||
let windows = &mut state.windows;
|
||||
if let Some(win_data) = self
|
||||
.window
|
||||
.as_ref()
|
||||
.map(|win| windows.get_mut(&win).unwrap())
|
||||
{
|
||||
if let Some(win_data) = self.window.as_ref().and_then(|win| windows.get_mut(win)) {
|
||||
let (x, y) = match output.position {
|
||||
OutputPosition::Xdg { x, y } => (x, y),
|
||||
OutputPosition::Wl { x, y } => (x, y),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue