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