shell/tiling: Fix segfault on detaching last output
This commit is contained in:
parent
38c0acb943
commit
fcf39337a7
2 changed files with 2 additions and 2 deletions
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "1.63"
|
||||
channel = "1.65"
|
||||
|
|
@ -267,7 +267,7 @@ impl TilingLayout {
|
|||
pub fn unmap_output(&mut self, output: &Output) {
|
||||
if let Some(src) = self.trees.remove(output) {
|
||||
// TODO: expects last remaining output
|
||||
let (output, dst) = self.trees.iter_mut().next().unwrap();
|
||||
let Some((output, dst)) = self.trees.iter_mut().next() else { return; };
|
||||
let orientation = match output.output.geometry().size {
|
||||
x if x.w >= x.h => Orientation::Horizontal,
|
||||
_ => Orientation::Vertical,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue