kms: Don't incorrectly re-use iterator in update_surface_nodes
This commit is contained in:
parent
6492629f90
commit
fd85e4ea56
2 changed files with 11 additions and 10 deletions
|
|
@ -872,7 +872,7 @@ impl InnerDevice {
|
|||
pub fn update_surface_nodes<'b>(
|
||||
&mut self,
|
||||
used_devices: &HashSet<DrmNode>,
|
||||
mut others: impl Iterator<Item = &'b Self>,
|
||||
others: &[&'b mut Self],
|
||||
) -> Result<()>
|
||||
where
|
||||
Self: 'b,
|
||||
|
|
@ -891,7 +891,10 @@ impl InnerDevice {
|
|||
self.gbm.clone(),
|
||||
)
|
||||
} else {
|
||||
let device = others.find(|d| d.render_node == *new_device).unwrap();
|
||||
let device = others
|
||||
.iter()
|
||||
.find(|d| d.render_node == *new_device)
|
||||
.unwrap();
|
||||
(
|
||||
device.render_node,
|
||||
device.egl.as_ref().unwrap(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue