Fix crash when receiving non-utf8 data
This commit also changes return type of `load` and `load_primary` to propagate errors during reading and parsing clipboard contents.
This commit is contained in:
parent
9855d34e4a
commit
2971386aea
3 changed files with 33 additions and 21 deletions
|
|
@ -37,7 +37,7 @@ fn main() {
|
|||
} = event
|
||||
{
|
||||
if text == " " {
|
||||
*cb_contents_clone.lock().unwrap() = dbg!(clipboard.load(None));
|
||||
*cb_contents_clone.lock().unwrap() = dbg!(clipboard.load(None).unwrap());
|
||||
need_redraw_clone.store(true, atomic::Ordering::Relaxed)
|
||||
} else if text == "s" {
|
||||
clipboard.store(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue