diff --git a/CHANGELOG.md b/CHANGELOG.md index 41a433a..7331cdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Crash when failing to write to a clipboard + ## 0.6.0 -- 2020-10-03 - Updated smithay-client-toolkit to 0.12 diff --git a/src/worker/handlers.rs b/src/worker/handlers.rs index 08ca172..8e197dd 100644 --- a/src/worker/handlers.rs +++ b/src/worker/handlers.rs @@ -76,7 +76,9 @@ macro_rules! handle_store { vec![MimeType::TextPlainUtf8.to_string(), MimeType::Utf8String.to_string()], move |event, _| { if let $event_ty::Send { mut pipe, .. } = event { - write!(pipe, "{}", $contents).unwrap(); + // If we fail to write here, it means that other side closed the pipe, thus + // we can't do anything about it. + let _ = write!(pipe, "{}", $contents); } }, );