xr_wait_frame lock match instead of unwrap

This commit is contained in:
Alexi Chepura
2023-10-24 16:42:39 +03:00
parent 879c40f0f8
commit d2ccad9f46

View File

@@ -259,7 +259,13 @@ pub fn xr_begin_frame(
}
{
let _span = info_span!("xr_wait_frame").entered();
*frame_state.lock().unwrap() = frame_waiter.lock().unwrap().wait().unwrap();
*frame_state.lock().unwrap() = match frame_waiter.lock().unwrap().wait() {
Ok(a) => a,
Err(e) => {
warn!("error: {}", e);
return;
}
};
}
{
let _span = info_span!("xr_begin_frame").entered();