Merge pull request #1 from awtterpip/main

xr_wait_frame lock match instead of unwrap
This commit is contained in:
Schmarni
2023-10-31 23:36:57 +01:00
committed by GitHub
3 changed files with 47 additions and 1 deletions

View File

@@ -261,7 +261,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();