Skip to content

Commit

Permalink
Fix copy and paste
Browse files Browse the repository at this point in the history
  • Loading branch information
dberlin committed Jun 24, 2024
1 parent ea19513 commit ed0d4c6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions window/src/os/wayland/copy_and_paste.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,12 @@ impl CopyAndPaste {
impl WaylandState {
pub(super) fn resolve_copy_and_paste(&mut self) -> Option<Arc<Mutex<CopyAndPaste>>> {
let active_surface_id = self.active_surface_id.borrow();
let active_surface_id = active_surface_id.as_ref().unwrap();
if let Some(pending) = self.surface_to_pending.get(&active_surface_id) {
Some(Arc::clone(&pending.lock().unwrap().copy_and_paste))
if let Some(active_surface_id) = active_surface_id.as_ref() {
if let Some(pending) = self.surface_to_pending.get(&active_surface_id) {
Some(Arc::clone(&pending.lock().unwrap().copy_and_paste))
} else {
None
}
} else {
None
}
Expand Down

0 comments on commit ed0d4c6

Please sign in to comment.