Fix a panic

This commit is contained in:
Ian Douglas Scott 2023-12-06 15:35:25 -08:00
parent 5550f41814
commit c939486ce6

View file

@ -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();
}
}