Skip to content

Commit

Permalink
avoid unwrap when detaching seat
Browse files Browse the repository at this point in the history
refs: wez#5276
  • Loading branch information
wez authored and saep committed Jul 14, 2024
1 parent fc3a545 commit ec5f6ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion window/src/os/wayland/seat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl SeatHandler for WaylandState {
match capability {
Capability::Keyboard => {
log::trace!("Lost keyboard capability");
self.keyboard.take().unwrap().release();
self.keyboard.take().map(|k| k.release());
}
Capability::Pointer => {
log::trace!("Lost pointer capability");
Expand Down

0 comments on commit ec5f6ec

Please sign in to comment.