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
|
// TODO
|
||||||
println!("Failed");
|
println!("Failed");
|
||||||
let capture = Capture::for_session(session).unwrap();
|
if let Some(capture) = Capture::for_session(session) {
|
||||||
capture.cancel();
|
capture.cancel();
|
||||||
|
} else {
|
||||||
|
println!("Capture not found?")
|
||||||
|
}
|
||||||
session.destroy();
|
session.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue