Fix a panic
This commit is contained in:
parent
5550f41814
commit
c939486ce6
1 changed files with 5 additions and 2 deletions
|
|
@ -89,8 +89,11 @@ impl ScreencopyHandler for AppData {
|
|||
) {
|
||||
// TODO
|
||||
println!("Failed");
|
||||
let capture = Capture::for_session(session).unwrap();
|
||||
capture.cancel();
|
||||
if let Some(capture) = Capture::for_session(session) {
|
||||
capture.cancel();
|
||||
} else {
|
||||
println!("Capture not found?")
|
||||
}
|
||||
session.destroy();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue