mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-06 09:31:28 +03:00
fix clipboard crash and https://github.com/rustdesk/rustdesk/issues/302
This commit is contained in:
@@ -97,8 +97,12 @@ mod listen {
|
||||
|
||||
fn trigger(ctx: &mut ClipboardContext) {
|
||||
let _ = match ctx.get_text() {
|
||||
Ok(text) => ctx.set_text(text),
|
||||
Err(_) => ctx.set_text(Default::default()),
|
||||
Ok(text) => {
|
||||
if !text.is_empty() {
|
||||
ctx.set_text(text).ok();
|
||||
}
|
||||
}
|
||||
Err(_) => {}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user