diff --git a/anvil/src/shell/mod.rs b/anvil/src/shell/mod.rs index 43b3b93bfc63..86585c729245 100644 --- a/anvil/src/shell/mod.rs +++ b/anvil/src/shell/mod.rs @@ -115,11 +115,12 @@ impl CompositorHandler for AnvilState { add_pre_commit_hook::(surface, move |state, _dh, surface| { let mut acquire_point = None; let maybe_dmabuf = with_states(surface, |surface_data| { - acquire_point = surface_data - .cached_state - .pending::() - .acquire_point - .clone(); + acquire_point.clone_from( + &surface_data + .cached_state + .pending::() + .acquire_point, + ); surface_data .cached_state .pending::()