Skip to content

Commit

Permalink
xr_wait_frame lock match instead of unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
alexichepura committed Oct 24, 2023
1 parent 879c40f commit d2ccad9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d2ccad9

Please sign in to comment.