Fix reference to back buffer

This commit is contained in:
Ian Douglas Scott 2024-01-25 16:21:21 -08:00
parent 9faaa4d6c8
commit 7ae2dc9e06

View file

@ -58,7 +58,7 @@ impl ScreencopySession {
}
fn attach_buffer_and_commit(&mut self, capture: &Capture, conn: &Connection) {
let Some(back) = self.buffers.as_mut().and_then(|x| x.last()) else {
let Some(back) = self.buffers.as_ref().map(|x| &x[1]) else {
return;
};