mirror of
https://github.com/FluxaMedia/fluxa-desktop.git
synced 2026-08-06 16:59:20 +00:00
fix: MutexGuard temporary outliving its borrow in report_swap call
if-let on a temporary lock guard without a trailing semicolon extends the guard's drop scope past the enclosing block, so the State it borrowed from gets dropped first -- E0597 on macOS/Windows.
This commit is contained in:
parent
11e6476c96
commit
5ca395dbbf
2 changed files with 2 additions and 2 deletions
|
|
@ -442,7 +442,7 @@ pub fn install(app_handle: AppHandle) -> Result<NativePlayerSurface, String> {
|
|||
let state = app.state::<DesktopState>();
|
||||
if let Some(r) = state.player_renderer.lock().unwrap().as_ref() {
|
||||
r.report_swap();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
check_player_events(&app);
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ pub fn install(app_handle: AppHandle) -> Result<NativePlayerSurface, String> {
|
|||
let state = app.state::<DesktopState>();
|
||||
if let Some(r) = state.player_renderer.lock().unwrap().as_ref() {
|
||||
r.report_swap();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
check_player_events(&app);
|
||||
|
|
|
|||
Loading…
Reference in a new issue